Address new linter complaints

This commit is contained in:
Katrina Verey
2022-03-29 18:18:23 -04:00
parent b368b347d1
commit 14947e449b
77 changed files with 220 additions and 210 deletions

View File

@@ -36,7 +36,7 @@ const (
var stringToBuiltinPluginTypeMap map[string]BuiltinPluginType
func init() {
func init() { //nolint:gochecknoinits
stringToBuiltinPluginTypeMap = makeStringToBuiltinPluginTypeMap()
}

View File

@@ -83,7 +83,6 @@ metadata:
`
if expected != string(p.Cfg()) {
t.Fatalf("expected cfg '%s', got '%s'", expected, string(p.Cfg()))
}
if len(p.Args()) != 6 {
t.Fatalf("unexpected arg len %d, %#v", len(p.Args()), p.Args())

View File

@@ -105,10 +105,10 @@ func TestUpdateResourceOptionsWithInvalidHashAnnotationValues(t *testing.T) {
"TrUe",
"potato",
}
for i, c := range cases {
for i := range cases {
name := fmt.Sprintf("test%d", i)
in := resmap.New()
err := in.Append(makeConfigMap(rf, name, "", &c))
err := in.Append(makeConfigMap(rf, name, "", &cases[i]))
require.NoError(t, err)
_, err = UpdateResourceOptions(in)
require.Error(t, err)