mirror of https://github.com/dmarkham/enumer.git
Merge pull request #7 from dmarkham/new-comment
Only add the comment line when there is a comment
This commit is contained in:
commit
296228769d
|
@ -110,7 +110,9 @@ func main() {
|
||||||
// Print the header and package clause.
|
// Print the header and package clause.
|
||||||
g.Printf("// Code generated by \"enumer %s\"; DO NOT EDIT.\n", strings.Join(os.Args[1:], " "))
|
g.Printf("// Code generated by \"enumer %s\"; DO NOT EDIT.\n", strings.Join(os.Args[1:], " "))
|
||||||
g.Printf("\n")
|
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("package %s", g.pkg.name)
|
||||||
g.Printf("\n")
|
g.Printf("\n")
|
||||||
g.Printf("import (\n")
|
g.Printf("import (\n")
|
||||||
|
|
Loading…
Reference in New Issue