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

Method AllowMissingKeys

util/jsonpath/jsonpath.go:53–56  ·  view source on GitHub ↗

AllowMissingKeys allows a caller to specify whether they want an error if a field or map key cannot be located, or simply an empty result. The receiver is returned for chaining.

(allow bool)

Source from the content-addressed store, hash-verified

51// AllowMissingKeys allows a caller to specify whether they want an error if a field or map key
52// cannot be located, or simply an empty result. The receiver is returned for chaining.
53func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath {
54 j.allowMissingKeys = allow
55 return j
56}
57
58// Parse parses the given template and returns an error.
59func (j *JSONPath) Parse(text string) error {

Callers 1

testJSONPathFunction · 0.80

Calls

no outgoing calls

Tested by 1

testJSONPathFunction · 0.64