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 коммит произвёл Andrew Gerrand
Родитель 2b5f3dc0de
Коммит 0f7bc42285
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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