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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user