copyright: limit copyright checking to .go files

The existing code looked at any file ending 'go' including,
for instance, default.pgo.

Change-Id: I9a8344d2e23da351ca13a888a367457537e5c1b1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/622895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Peter Weinberger 2024-10-28 14:55:05 -04:00
Родитель 73d6794ebb
Коммит b0f44d5fb4
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -52,7 +52,7 @@ license that can be found in the LICENSE file.`)
func checkFile(toolsDir, filename string) (bool, error) {
// Only check Go files.
if !strings.HasSuffix(filename, "go") {
if !strings.HasSuffix(filename, ".go") {
return false, nil
}
// Don't check testdata files.