mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Remove some obsolete references to GrepFilter
Looks like GrepFilter was generalized to Filter.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user