diff --git a/stringer.go b/stringer.go index 1527b7d..d672639 100644 --- a/stringer.go +++ b/stringer.go @@ -110,7 +110,9 @@ func main() { // Print the header and package clause. g.Printf("// Code generated by \"enumer %s\"; DO NOT EDIT.\n", strings.Join(os.Args[1:], " ")) g.Printf("\n") - g.Printf("// %s\n", comments.String()) + if comments.String() != "" { + g.Printf("// %s\n", comments.String()) + } g.Printf("package %s", g.pkg.name) g.Printf("\n") g.Printf("import (\n")