From 2aa2cd5d354ad34272e6c99bd652362ee56640d1 Mon Sep 17 00:00:00 2001 From: Andrew Stone Date: Thu, 15 Feb 2024 14:26:44 -0800 Subject: [PATCH] generate: Clean up file header --- generate/generate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generate/generate.go b/generate/generate.go index 1bb17bb..e1c67ec 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -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, ), ) } @@ -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 }