Skip to content

Commit 8d5aaa4

Browse files
committed
simplify outConfig with convert errors
1 parent ff296ec commit 8d5aaa4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/cli/clu2adv/opts.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ func (o *opts) generateFile(allowParseErrors bool) error {
4646
outConfig, err := convert.ClusterToAdvancedCluster(inConfig)
4747
if err != nil {
4848
if allowParseErrors {
49-
prefix := []byte("# CONVERT ERROR: " + err.Error() + "\n\n")
50-
outConfig = append([]byte(nil), prefix...)
49+
outConfig = []byte("# CONVERT ERROR: " + err.Error() + "\n\n")
5150
outConfig = append(outConfig, inConfig...)
5251
} else {
5352
return err

0 commit comments

Comments
 (0)