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

@@ -363,7 +363,7 @@ func TestConditionSet(t *testing.T) {
}
actualConditions := actual.AsList()
if len(actualConditions) != len(expectedConditions) {
t.Errorf("len(MatchingAny(%d).AsList()): got %d, want %d",
t.Errorf("len(MatchingAny(%s).AsList()): got %d, want %d",
data, len(actualNames), len(expectedNames))
} else {
for i := 0; i < len(actualNames); i++ {
@@ -452,7 +452,7 @@ func TestConditionSet(t *testing.T) {
for i := 0; i < len(actualConditions); i++ {
if actualConditions[i] != expectedConditions[i] {
t.Errorf("actual.AsList()[%d]: got %s, want %s",
i, actualConditions[i], expectedConditions[i])
i, actualConditions[i].Name(), expectedConditions[i].Name())
break
}
}
@@ -552,7 +552,7 @@ func TestConditionSet(t *testing.T) {
for i := 0; i < len(actualConditions); i++ {
if actualConditions[i] != expectedConditions[i] {
t.Errorf("actual.AsList()[%d}: got %s, want %s",
i, actualConditions[i], expectedConditions[i])
i, actualConditions[i].Name(), expectedConditions[i].Name())
break
}
}