From 93365919b501f4b7dcd0cf3ce84c34a584efc17f Mon Sep 17 00:00:00 2001 From: njuptlzf Date: Fri, 2 Apr 2021 12:23:30 +0800 Subject: [PATCH] Fix staticcheck failures --- hack/.staticcheck_failures | 1 - .../apiserver/pkg/storage/selection_predicate_test.go | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index c3e3e7b33a7..f64f79f1e2a 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -1,7 +1,6 @@ vendor/k8s.io/apiserver/pkg/server/dynamiccertificates vendor/k8s.io/apiserver/pkg/server/filters vendor/k8s.io/apiserver/pkg/server/routes -vendor/k8s.io/apiserver/pkg/storage vendor/k8s.io/apiserver/pkg/storage/cacher vendor/k8s.io/apiserver/pkg/storage/tests vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope diff --git a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go index fa16362fe9c..fc030cc9904 100644 --- a/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go +++ b/staging/src/k8s.io/apiserver/pkg/storage/selection_predicate_test.go @@ -31,18 +31,10 @@ type Ignored struct { ID string } -type IgnoredList struct { - Items []Ignored -} - -func (obj *Ignored) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *IgnoredList) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj *Ignored) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } func (obj *Ignored) DeepCopyObject() runtime.Object { panic("Ignored does not support DeepCopy") } -func (obj *IgnoredList) DeepCopyObject() runtime.Object { - panic("IgnoredList does not support DeepCopy") -} func TestSelectionPredicate(t *testing.T) { table := map[string]struct {