Remove some obsolete references to GrepFilter

Looks like GrepFilter was generalized to Filter.
This commit is contained in:
Justin SB
2020-09-04 13:41:16 -04:00
parent e7970d82a8
commit eb4c5dc035
2 changed files with 7 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ var Filters = map[string]func() Filter{
"TeePiper": func() Filter { return &TeePiper{} }, "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. // data and can be unmarshalled into a struct from a yaml config file.
// This allows Pipelines to be expressed as data rather than code. // This allows Pipelines to be expressed as data rather than code.
type YFilter struct { type YFilter struct {
@@ -54,7 +54,7 @@ func (y *YFilter) UnmarshalYAML(unmarshal func(interface{}) error) error {
knownFilters = append(knownFilters, k) knownFilters = append(knownFilters, k)
} }
sort.Strings(knownFilters) 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, ",")) meta.Kind, strings.Join(knownFilters, ","))
} }
y.Filter = filter() y.Filter = filter()

View File

@@ -277,14 +277,14 @@ func (rn *RNode) GetMeta() (ResourceMeta, error) {
return m, nil return m, nil
} }
// Pipe sequentially invokes each GrepFilter, and passes the result to the next // Pipe sequentially invokes each Filter, and passes the result to the next
// GrepFilter. // Filter.
// //
// Analogous to http://www.linfo.org/pipes.html // Analogous to http://www.linfo.org/pipes.html
// //
// * rn is provided as input to the first GrepFilter. // * rn is provided as input to the first Filter.
// * if any GrepFilter returns an error, immediately return the error // * if any Filter returns an error, immediately return the error
// * if any GrepFilter returns a nil RNode, immediately return nil, nil // * if any Filter returns a nil RNode, immediately return nil, nil
// * if all Filters succeed with non-empty results, return the final result // * if all Filters succeed with non-empty results, return the final result
func (rn *RNode) Pipe(functions ...Filter) (*RNode, error) { func (rn *RNode) Pipe(functions ...Filter) (*RNode, error) {
// check if rn is nil to make chaining Pipe calls easier // check if rn is nil to make chaining Pipe calls easier