More linting (#2099)
* Address gocritic findings, enable it * Enable gosimple, no new findings to address
This commit is contained in:
@ -133,7 +133,7 @@ func fillHeader(header *GenManHeader, name string, disableAutoGen bool) error {
|
||||
}
|
||||
header.Date = &now
|
||||
}
|
||||
header.date = (*header.Date).Format("Jan 2006")
|
||||
header.date = header.Date.Format("Jan 2006")
|
||||
if header.Source == "" && !disableAutoGen {
|
||||
header.Source = "Auto generated by spf13/cobra"
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ func hasSeeAlso(cmd *cobra.Command) bool {
|
||||
// that do not contain \n.
|
||||
func forceMultiLine(s string) string {
|
||||
if len(s) > 60 && !strings.Contains(s, "\n") {
|
||||
s = s + "\n"
|
||||
s += "\n"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
Reference in New Issue
Block a user