MCPcopy
hub / github.com/kubernetes/client-go / Parse

Function Parse

util/jsonpath/parser.go:55–62  ·  view source on GitHub ↗

Parse parsed the given text and return a node Parser. If an error is encountered, parsing stops and an empty Parser is returned with the error

(name, text string)

Source from the content-addressed store, hash-verified

53// If an error is encountered, parsing stops and an empty
54// Parser is returned with the error
55func Parse(name, text string) (*Parser, error) {
56 p := NewParser(name)
57 err := p.Parse(text)
58 if err != nil {
59 p = nil
60 }
61 return p, err
62}
63
64func NewParser(name string) *Parser {
65 return &Parser{

Callers 4

TestParserFunction · 0.85
TestFailParserFunction · 0.85
ParseMethod · 0.85
parseActionFunction · 0.85

Calls 2

ParseMethod · 0.95
NewParserFunction · 0.85

Tested by 2

TestParserFunction · 0.68
TestFailParserFunction · 0.68