* Parse the strings into a filter that may be used with an adaptor. The filter is made up of zero or more selectors. The format is a comma separated list of expressions, in the form of ` `, known as selectors. All selectors must match the target object for the filter to be tru
(s string)
| 47 | quoted := <go string syntax> |
| 48 | */ |
| 49 | func Parse(s string) (Filter, error) { |
| 50 | // special case empty to match all |
| 51 | if s == "" { |
| 52 | return Always, nil |
| 53 | } |
| 54 | |
| 55 | p := parser{input: s} |
| 56 | return p.parse() |
| 57 | } |
| 58 | |
| 59 | // ParseAll parses each filter in ss and returns a filter that will return true |
| 60 | // if any filter matches the expression. |
searching dependent graphs…