Skip to content

Commit c31bc21

Browse files
committed
tools: fix vet errors and add missing copyright headers
Change-Id: I6dabbe2a622738b8cc66928fe22a84c27e6e7a32 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/412059 Reviewed-by: Dylan Le <[email protected]>
1 parent 58685fc commit c31bc21

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

tools/docs2wiki/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2022 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
//go:build !windows
26
// +build !windows
37

tools/installtools/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2021 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
// Binary installtools is a helper that installs Go tools extension tests depend on.
26
package main
37

tools/installtools/main_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2021 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
// Binary installtools is a helper that installs Go tools extension tests depend on.
26
package main
37

tools/relnotes/relnotes.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,6 @@ func mdPrintReleaseComments(changes []*generic.Changelist) {
278278
}
279279
}
280280

281-
// clPackage returns the package name from the CL's commit message,
282-
// or "??" if it's formatted unconventionally.
283-
func clPackage(cl *maintner.GerritCL) string {
284-
subj := cl.Subject()
285-
if i := strings.Index(subj, ":"); i != -1 {
286-
return subj[:i]
287-
}
288-
return "??"
289-
}
290-
291281
var relNoteRx = regexp.MustCompile(`RELNOTES?=(.+)`)
292282

293283
func parseRelNote(s string) string {
@@ -314,7 +304,7 @@ func mdPrintContributors(cls map[*maintner.GerritCL]bool) {
314304
for changelist := range cls {
315305
author, err := fetchCLAuthorName(changelist, *project)
316306
if err != nil {
317-
log.Fatal("Error fetching Github information for %s: %v\n", changelist.Owner(), err)
307+
log.Fatalf("Error fetching Github information for %s: %v\n", changelist.Owner(), err)
318308
}
319309
usernames = append(usernames, author)
320310
}
@@ -390,7 +380,7 @@ func unique(input []string) []string {
390380
m[entry] = true
391381
}
392382
var list []string
393-
for key, _ := range m {
383+
for key := range m {
394384
list = append(list, key)
395385
}
396386
sort.Strings(list)

0 commit comments

Comments
 (0)