diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 1b2b9b8e0f6..89fdb52fdd9 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -7,7 +7,6 @@ test/integration/framework test/integration/garbagecollector test/integration/scheduler_perf vendor/k8s.io/apimachinery/pkg/api/apitesting/roundtrip -vendor/k8s.io/apimachinery/pkg/api/meta vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation vendor/k8s.io/apimachinery/pkg/runtime vendor/k8s.io/apimachinery/pkg/runtime/serializer/json diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go index 9ca34c9fa9c..6a4116a040b 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -40,8 +40,6 @@ func CommonAccessor(obj interface{}) (metav1.Common, error) { switch t := obj.(type) { case List: return t, nil - case metav1.ListInterface: - return t, nil case ListMetaAccessor: if m := t.GetListMeta(); m != nil { return m, nil @@ -72,8 +70,6 @@ func ListAccessor(obj interface{}) (List, error) { switch t := obj.(type) { case List: return t, nil - case metav1.ListInterface: - return t, nil case ListMetaAccessor: if m := t.GetListMeta(); m != nil { return m, nil diff --git a/staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go b/staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go index 853404ad6c8..f168f033c70 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go @@ -588,23 +588,23 @@ func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { } // mismatch of version - mapping, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version) + _, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version) if err == nil { t.Errorf("unexpected non-error") } - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version) + _, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version) if err == nil { t.Errorf("unexpected non-error") } // not in the search versions - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version) + _, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version) if err == nil { t.Errorf("unexpected non-error") } // explicit search order - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion1.Version) + _, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion1.Version) if err == nil { t.Errorf("unexpected non-error") }