MCPcopy Index your code
hub / github.com/PaesslerAG/jsonpath / evaluatePath

Method evaluatePath

path.go:20–29  ·  view source on GitHub ↗
(ctx context.Context, root, value interface{})

Source from the content-addressed store, hash-verified

18}
19
20func (p plainPath) evaluatePath(ctx context.Context, root, value interface{}) (interface{}, error) {
21 var err error
22 for _, sel := range p {
23 value, err = sel(ctx, root, value)
24 if err != nil {
25 return nil, err
26 }
27 }
28 return value, nil
29}
30
31func (p plainPath) matcher(ctx context.Context, r interface{}, match ambiguousMatcher) ambiguousMatcher {
32 if len(p) == 0 {

Callers 3

evaluateMethod · 0.95
matcherMethod · 0.95
visitMatchsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected