diff --git a/ds_builder.go b/ds_builder.go index 1f2ad14..21951f3 100644 --- a/ds_builder.go +++ b/ds_builder.go @@ -185,7 +185,7 @@ func (b *dsBuilder) Create(ctx context.Context, cs kubernetes.Interface) (DS, er } } if len(b.regex) != 0 { - regexFilter, err := NameRegexFileter(b.regex) + regexFilter, err := NewNameRegexFilter(b.regex) if err != nil { ds.closeAll() return nil, log.Err(err, "regex filter") diff --git a/filter.go b/filter.go index 967b57e..71325fb 100644 --- a/filter.go +++ b/filter.go @@ -6,7 +6,7 @@ import ( "github.com/boz/kcache/filter" "github.com/boz/kcache/nsname" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -75,7 +75,7 @@ func SourcesForPod( return id, sources } -func NameRegexFileter(regex string) (filter.Filter, error) { +func NewNameRegexFilter(regex string) (filter.Filter, error) { compile, err := regexp.Compile(regex) if err != nil { return nil, err