mirror of https://github.com/fluxcd/cli-utils.git
chore: fix linter failures
This commit is contained in:
parent
64e15191f3
commit
df4661a8f5
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue