1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:54:44 -07:00

godoc/static: have makestatic use the same code header comment as stringer

This allows Github to hide diffs in generated files. See:
https://github.com/github/linguist/blob/473282d/lib/linguist/generated.rb#L241

Change-Id: I0565c729dacfa7861e7da7eb66bc8021d191fc3e
Reviewed-on: https://go-review.googlesource.com/15074
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Tamir Duberstein 2015-09-27 09:47:54 -04:00 committed by Andrew Gerrand
parent 2b5f3dc0de
commit 0f7bc42285
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ func makestatic() error {
}
defer f.Close()
w := bufio.NewWriter(f)
fmt.Fprintf(w, "%v\n\npackage static\n\n", warning)
fmt.Fprintf(w, "%v\npackage static\n\n", warning)
fmt.Fprintf(w, "var Files = map[string]string{\n")
for _, fn := range files {
b, err := ioutil.ReadFile(fn)
@ -118,4 +118,4 @@ func sanitize(b []byte) []byte {
return bytes.Replace(b, []byte("\xEF\xBB\xBF"), []byte("`+\"\\xEF\\xBB\\xBF\"+`"), -1)
}
const warning = "// DO NOT EDIT ** This file was generated by \"go generate\" ** DO NOT EDIT //"
const warning = "// Code generated by \"makestatic\"; DO NOT EDIT\n"

View File

@ -1,4 +1,4 @@
// DO NOT EDIT ** This file was generated by "go generate" ** DO NOT EDIT //
// Code generated by "makestatic"; DO NOT EDIT
package static