summaryrefslogtreecommitdiffhomepage
path: root/util/codegen
diff options
context:
space:
mode:
authorDenton Gentry <dgentry@tailscale.com>2023-01-01 15:53:03 -0800
committerDenton Gentry <dgentry@tailscale.com>2023-01-01 16:36:10 -0800
commit239b7cce74ed066dc362843d39bbaf3353f5027d (patch)
tree4dd63c37b46079454f09b08cc92c0d091b1b471a /util/codegen
parent692eac23adf62f979dddb5b9694d084142036f10 (diff)
downloadtailscale-cloner.tar.xz
tailscale-cloner.zip
util/codegen: Remove year from copyright header.cloner
Copyright notices in software are not supposed to update the year in the header. Because we have a CI check for `go generate`, we're failing CI until we go update all of the copyright headers in generated files to say 2023. Instead, relax the requirement to always have a year in the copyright header. Fixes https://github.com/tailscale/tailscale/issues/6865 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Diffstat (limited to 'util/codegen')
-rw-r--r--util/codegen/codegen.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/util/codegen/codegen.go b/util/codegen/codegen.go
index 61ec85de8..7fc575fd4 100644
--- a/util/codegen/codegen.go
+++ b/util/codegen/codegen.go
@@ -15,7 +15,6 @@ import (
"os"
"reflect"
"strings"
- "time"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/imports"
@@ -54,7 +53,7 @@ func HasNoClone(structTag string) bool {
return false
}
-const header = `// Copyright (c) %d Tailscale Inc & AUTHORS All rights reserved.
+const header = `// Copyright (c) Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -105,7 +104,7 @@ func (it *ImportTracker) Write(w io.Writer) {
}
func writeHeader(w io.Writer, tool, pkg string) {
- fmt.Fprintf(w, header, time.Now().Year(), tool, pkg)
+ fmt.Fprintf(w, header, tool, pkg)
}
// WritePackageFile adds a file with the provided imports and contents to package.