Skip to content

Commit

Permalink
godoc/static: update copyright year to 2013
Browse files Browse the repository at this point in the history
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 <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
  • Loading branch information
dmitshur committed Jan 2, 2020
1 parent f67ffd6 commit 1aff452
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions static/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"fmt"
"go/format"
"io/ioutil"
"time"
"unicode"
)

Expand Down Expand Up @@ -101,6 +100,6 @@ func appendQuote(out *bytes.Buffer, data []byte) {

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
// license that can be found in the LICENSE file.`, time.Now().UTC().Year())
// license that can be found in the LICENSE file.`
2 changes: 1 addition & 1 deletion static/static.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1aff452

Please sign in to comment.