Skip to content

Commit

Permalink
generate: Clean up file header
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguystone committed Feb 15, 2024
1 parent 7573b69 commit 2aa2cd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ func New() *Buffer {
if !strings.HasSuffix(srcPath, cmdSuffix) {
panic(
fmt.Errorf(
`generate cmd %q must have a name in the form of "*.cmd.go"`,
`generate cmd %q must have a name in the form of "*%s"`,
srcPath,
cmdSuffix,
),
)
}
Expand All @@ -37,10 +38,9 @@ func New() *Buffer {
}

fmt.Fprintf(b, "// Code generated by `go generate %s`. DO NOT EDIT.\n", srcPath)
fmt.Fprintln(b)

fmt.Fprintf(b, "\n")
fmt.Fprintf(b, "package %s\n", getPkgName())
fmt.Fprintln(b)
fmt.Fprintf(b, "\n")

return b
}
Expand Down

0 comments on commit 2aa2cd5

Please sign in to comment.