Cleanup nitpick suggestion in the lint command

Have fixed up a non-blocking nitpick change from #6310, this just
switches us to use a regular string rather than a string.Builder for the
summary.

Signed-off-by: Thomas O'Donnell <andy.tom@gmail.com>
This commit is contained in:
Thomas O'Donnell 2019-09-06 15:42:05 +02:00
parent 5cb923eecb
commit 69feb96490
1 changed files with 3 additions and 4 deletions

View File

@ -91,12 +91,11 @@ func newLintCmd(out io.Writer) *cobra.Command {
fmt.Fprintf(out, message.String())
var summary strings.Builder
fmt.Fprintf(&summary, "%d chart(s) linted, %d chart(s) failed", len(paths), failed)
summary := fmt.Sprintf("%d chart(s) linted, %d chart(s) failed", len(paths), failed)
if failed > 0 {
return errors.New(summary.String())
return errors.New(summary)
}
fmt.Fprintf(out, "%s\n", summary.String())
fmt.Fprintln(out, summary)
return nil
},
}