mirror of
https://github.com/golang/go
synced 2024-11-05 14:56:10 -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:
parent
2b5f3dc0de
commit
0f7bc42285
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user