chore: fix linter failures

This commit is contained in:
Mikhail Mazurskiy 2022-01-15 17:43:51 +11:00
parent 64e15191f3
commit df4661a8f5
No known key found for this signature in database
GPG Key ID: FA7917C48932DD55
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ func UnstructuredToInfo(obj *unstructured.Unstructured) (*resource.Info, error)
// kyaml adds both annotations for the time being, so we need to remove them both
// before apply.
delete(annos, kioutil.PathAnnotation)
delete(annos, kioutil.LegacyPathAnnotation)
delete(annos, kioutil.LegacyPathAnnotation) //nolint:staticcheck
obj.SetAnnotations(annos)
}

View File

@ -44,7 +44,7 @@ func TestUnstructuredToInfo(t *testing.T) {
"name": "foo",
"annotations": map[string]interface{}{
kioutil.PathAnnotation: "deployment.yaml",
kioutil.LegacyPathAnnotation: "deployment.yaml",
kioutil.LegacyPathAnnotation: "deployment.yaml", //nolint:staticcheck
},
},
},
@ -87,7 +87,7 @@ func TestUnstructuredToInfo(t *testing.T) {
}
if found {
for _, a := range []kioutil.AnnotationKey{kioutil.PathAnnotation, kioutil.LegacyPathAnnotation} {
for _, a := range []kioutil.AnnotationKey{kioutil.PathAnnotation, kioutil.LegacyPathAnnotation} { //nolint:staticcheck
_, hasAnnotation := annos[a]
assert.False(t, hasAnnotation, "did not expect %s", a)
}