From eb4c5dc035b06ecd19641e910bd9063c84c344c9 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Fri, 4 Sep 2020 13:41:16 -0400 Subject: [PATCH] Remove some obsolete references to GrepFilter Looks like GrepFilter was generalized to Filter. --- kyaml/yaml/filters.go | 4 ++-- kyaml/yaml/rnode.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kyaml/yaml/filters.go b/kyaml/yaml/filters.go index 7d6d00fad..e364035e6 100644 --- a/kyaml/yaml/filters.go +++ b/kyaml/yaml/filters.go @@ -31,7 +31,7 @@ var Filters = map[string]func() Filter{ "TeePiper": func() Filter { return &TeePiper{} }, } -// YFilter wraps the GrepFilter interface so the filter can be represented as +// YFilter wraps the Filter interface so the filter can be represented as // data and can be unmarshalled into a struct from a yaml config file. // This allows Pipelines to be expressed as data rather than code. type YFilter struct { @@ -54,7 +54,7 @@ func (y *YFilter) UnmarshalYAML(unmarshal func(interface{}) error) error { knownFilters = append(knownFilters, k) } sort.Strings(knownFilters) - return fmt.Errorf("unsupported GrepFilter Kind %s: may be one of: [%s]", + return fmt.Errorf("unsupported Filter Kind %s: may be one of: [%s]", meta.Kind, strings.Join(knownFilters, ",")) } y.Filter = filter() diff --git a/kyaml/yaml/rnode.go b/kyaml/yaml/rnode.go index 982b452c4..a97a92d0e 100644 --- a/kyaml/yaml/rnode.go +++ b/kyaml/yaml/rnode.go @@ -277,14 +277,14 @@ func (rn *RNode) GetMeta() (ResourceMeta, error) { return m, nil } -// Pipe sequentially invokes each GrepFilter, and passes the result to the next -// GrepFilter. +// Pipe sequentially invokes each Filter, and passes the result to the next +// Filter. // // Analogous to http://www.linfo.org/pipes.html // -// * rn is provided as input to the first GrepFilter. -// * if any GrepFilter returns an error, immediately return the error -// * if any GrepFilter returns a nil RNode, immediately return nil, nil +// * rn is provided as input to the first Filter. +// * if any Filter returns an error, immediately return the error +// * if any Filter returns a nil RNode, immediately return nil, nil // * if all Filters succeed with non-empty results, return the final result func (rn *RNode) Pipe(functions ...Filter) (*RNode, error) { // check if rn is nil to make chaining Pipe calls easier