Fix errors caught by go vet in compliance package

`go test` implicitly runs `go vet` and fails the tests if vet
errors are found.  Fix all the issues found by vet.

Test: go test build/make/tools/compliance/...
Change-Id: If0684cf124ece4931af440008cd44a61c22de475
This commit is contained in:
Colin Cross
2022-01-27 15:47:09 -08:00
parent 35f79c37aa
commit 179ec3e55e
20 changed files with 35 additions and 35 deletions

View File

@@ -88,9 +88,9 @@ func TestReadLicenseGraph(t *testing.T) {
lg, err := ReadLicenseGraph(tt.fs, stderr, tt.roots)
if err != nil {
if len(tt.expectedError) == 0 {
t.Errorf("unexpected error: got %w, want no error", err)
t.Errorf("unexpected error: got %s, want no error", err)
} else if !strings.Contains(err.Error(), tt.expectedError) {
t.Errorf("unexpected error: got %w, want %q", err, tt.expectedError)
t.Errorf("unexpected error: got %s, want %q", err, tt.expectedError)
}
return
}