in pkg/filter/filter.go [108:130]
func (f *Filter) PartitionComponents(data []*bundle.Component, o *Options) ([]*bundle.Component, []*bundle.Component) {
var newData []*bundle.Component
for _, cp := range data {
newData = append(newData, cp.DeepCopy())
}
data = newData
// nil options should not imply any change.
if o == nil {
return data, nil
}
var matched []*bundle.Component
var notMatched []*bundle.Component
for _, c := range data {
if MatchesComponent(c, o) {
matched = append(matched, c)
} else {
notMatched = append(notMatched, c)
}
}
return matched, notMatched
}