From 56e992ce17a09eba960ccff33c14c20cc7f37174 Mon Sep 17 00:00:00 2001 From: passionSeven Date: Thu, 2 Jan 2020 12:17:23 -0500 Subject: [PATCH] content/static: generate constant 2019 copyright year The generated static.go file was created in 2019 in CL 156321, and it inherited the generator code from x/tools that uses today's year. There isn't a need to update the copyright year, so make it a constant. This change fixes the failing TestStaticIsUpToDate test in 2020, and prevents it from breaking in every future year. Fixes golang/go#36360 Updates golang/go#11811 Change-Id: Ie87b1219448f1e288539f95280492b4f95b76798 Reviewed-on: https://go-review.googlesource.com/c/website/+/213121 Run-TryBot: Dmitri Shuralyov TryBot-Result: Gobot Gobot Reviewed-by: Rebecca Stambler --- content/static/gen.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/static/gen.go b/content/static/gen.go index 5882c2f5..ad67bb1f 100644 --- a/content/static/gen.go +++ b/content/static/gen.go @@ -11,7 +11,6 @@ import ( "fmt" "go/format" "io/ioutil" - "time" "unicode" ) @@ -106,6 +105,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 2019 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.`