1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:14:45 -07:00

godoc/static: update copyright year to 2013

The generated static.go file was missing a license header when it was
created in 2013 in CL 12805046. CL 38165 added a license header, using
the current year in the template. This causes the static.go file to go
"out of date" whenever the year changes.

Change the copyright year to be a fixed year when the file was created.
This way, the TestStaticIsUpToDate test will stop breaking every year.

Updates golang/go#36360
Updates golang/go#11811

Change-Id: If1597b0d93b7eacf23b7de103a6d7e3ca049bb4f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/213119
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Dmitri Shuralyov 2020-01-02 10:44:51 -05:00
parent 9497f49d57
commit 6ed6e6036b
2 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,6 @@ import (
"fmt" "fmt"
"go/format" "go/format"
"io/ioutil" "io/ioutil"
"time"
"unicode" "unicode"
) )
@ -101,6 +100,6 @@ func appendQuote(out *bytes.Buffer, data []byte) {
const warning = `// Code generated by "makestatic"; DO NOT EDIT.` const warning = `// Code generated by "makestatic"; DO NOT EDIT.`
var license = fmt.Sprintf(`// Copyright %d The Go Authors. All rights reserved. const license = `// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.`, time.Now().UTC().Year()) // license that can be found in the LICENSE file.`

View File

@ -1,4 +1,4 @@
// Copyright 2019 The Go Authors. All rights reserved. // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.