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
diff --git a/tools/compliance/readgraph_test.go b/tools/compliance/readgraph_test.go
index 6ff7a6c..db52fb1 100644
--- a/tools/compliance/readgraph_test.go
+++ b/tools/compliance/readgraph_test.go
@@ -88,9 +88,9 @@
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
}