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

Method Execute

util/jsonpath/jsonpath.go:66–77  ·  view source on GitHub ↗

Execute bounds data into template and writes the result.

(wr io.Writer, data interface{})

Source from the content-addressed store, hash-verified

64
65// Execute bounds data into template and writes the result.
66func (j *JSONPath) Execute(wr io.Writer, data interface{}) error {
67 fullResults, err := j.FindResults(data)
68 if err != nil {
69 return err
70 }
71 for ix := range fullResults {
72 if err := j.PrintResults(wr, fullResults[ix]); err != nil {
73 return err
74 }
75 }
76 return nil
77}
78
79func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) {
80 if j.parser == nil {

Callers 4

parseJSONPathFunction · 0.80
testJSONPathFunction · 0.80
testJSONPathSortOutputFunction · 0.80
testFailJSONPathFunction · 0.80

Calls 2

FindResultsMethod · 0.95
PrintResultsMethod · 0.95

Tested by 3

testJSONPathFunction · 0.64
testJSONPathSortOutputFunction · 0.64
testFailJSONPathFunction · 0.64