From bff7b031831fd7968d86e99ae89d79cf3f088eed Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Thu, 5 Dec 2024 15:00:47 +0100 Subject: [PATCH] Remove unused filter function (#8375) :broom: Remove unused filter function Signed-off-by: Matthias Wessendorf --- pkg/reconciler/filter.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 pkg/reconciler/filter.go diff --git a/pkg/reconciler/filter.go b/pkg/reconciler/filter.go deleted file mode 100644 index 8e08da324e1..00000000000 --- a/pkg/reconciler/filter.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2023 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package reconciler - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// FilterWithNamespace makes it simple to create FilterFunc's for use with -// cache.FilteringResourceEventHandler that filter based on a name. -func FilterWithNamespace(namespace string) func(obj interface{}) bool { - return func(obj interface{}) bool { - if object, ok := obj.(metav1.Object); ok { - return namespace == object.GetNamespace() - } - return false - } -}