From 4b07c5ce8adfdbd352cff286306e3829499f6ebf Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 27 Sep 2015 09:47:35 -0400 Subject: [PATCH] cmd/stringer: prepend "Code" to codegen warning This allows Github to hide diffs in generated files. See: https://github.com/github/linguist/blob/473282d/lib/linguist/generated.rb#L241 Change-Id: Ic0a9ed80ecc6130d81fd0ba10e2df48217eb14cc Reviewed-on: https://go-review.googlesource.com/15073 Reviewed-by: Brad Fitzpatrick --- cmd/stringer/stringer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/stringer/stringer.go b/cmd/stringer/stringer.go index be87dec7..38c9a268 100644 --- a/cmd/stringer/stringer.go +++ b/cmd/stringer/stringer.go @@ -128,7 +128,7 @@ func main() { } // Print the header and package clause. - g.Printf("// generated by stringer %s; DO NOT EDIT\n", strings.Join(os.Args[1:], " ")) + g.Printf("// Code generated by \"stringer %s\"; DO NOT EDIT\n", strings.Join(os.Args[1:], " ")) g.Printf("\n") g.Printf("package %s", g.pkg.name) g.Printf("\n")