MCPcopy Index your code
hub / github.com/containerd/containerd / Parse

Function Parse

pkg/filters/parser.go:49–57  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

47quoted := <go string syntax>
48*/
49func 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.

Callers 3

ParseAllFunction · 0.70
TestFiltersFunction · 0.70
FuzzFiltersParseFunction · 0.70

Calls 1

parseMethod · 0.95

Tested by 2

TestFiltersFunction · 0.56
FuzzFiltersParseFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…