// Undo implements plan.Resource.
Undo implements plan.Resource.
// Undo implements plan . Resource .
func (ks *KubeSecret) Undo(runner plan.Runner, current plan.State) error {
	if len(ks.SecretData) == 0 {
		return nil
	}
	var sb strings.Builder
	sb.WriteString("{")
	shouldWriteComma := false
	for filename := range ks.SecretData {
		if shouldWriteComma {
			sb.WriteString(",")
		} else {
			shouldWriteComma = true
		}
		sb.WriteString(ks.FileNameTransform(filename))
	}
	sb.WriteString("}")
	_, err := runner.RunCommand(fmt.Sprintf("rm -f %s/%s", ks.DestinationDirectory, sb.String()), nil)
	return err
}
func ( ks * KubeSecret ) Undo ( runner plan . Runner , current plan . State ) error { if len ( ks . SecretData ) == 0 { return nil } var sb strings . Builder sb . WriteString ( " " ) shouldWriteComma := false for filename := range ks . SecretData { if shouldWriteComma { sb . WriteString ( " " ) } else { shouldWriteComma = true } sb . WriteString ( ks . FileNameTransform ( filename ) ) } sb . WriteString ( " " ) _ , err := runner . RunCommand ( fmt . Sprintf ( " " , ks . DestinationDirectory , sb . String ( ) ) , nil ) return err }
Undo implements plan.Resource.
Undo implements plan . Resource .