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 - } -}