Skip to content

Commit

Permalink
chore: bump jmespath lib (#230)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Nov 28, 2023
1 parent 2fcbde7 commit c0febe2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gin-contrib/cors v1.5.0
github.com/gin-gonic/gin v1.9.1
github.com/jinzhu/copier v0.4.0
github.com/jmespath-community/go-jmespath v1.1.2-0.20231004164315-78945398586a
github.com/jmespath-community/go-jmespath v1.1.2-0.20231123142750-72f7c13d265e
github.com/kyverno/kyverno v1.5.0-rc1.0.20231029235953-c96199dee1f6
github.com/loopfz/gadgeto v0.11.3
github.com/nlepage/go-wasm-http-server v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jmespath-community/go-jmespath v1.1.2-0.20231004164315-78945398586a h1:8W5d74FhEWTJPnFwpDDxbwUK3pPLUbY4RlfN2uzTTSE=
github.com/jmespath-community/go-jmespath v1.1.2-0.20231004164315-78945398586a/go.mod h1:4gOyFJsR/Gk+05RgTKYrifT7tBPWD8Lubtb5jRrfy9I=
github.com/jmespath-community/go-jmespath v1.1.2-0.20231123142750-72f7c13d265e h1:mT/Ah0Ywodd7qzMw7eXF4/dv55+LnYSOAHhAPs1sNnM=
github.com/jmespath-community/go-jmespath v1.1.2-0.20231123142750-72f7c13d265e/go.mod h1:j4OeykGPBbhX3rw4AOPGXSmX2/zuWXktm704A4MtHFs=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg=
github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
Expand Down
4 changes: 2 additions & 2 deletions pkg/engine/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ func String(ctx context.Context, in string, value interface{}, bindings binding.
}

func Execute(ctx context.Context, statement string, value interface{}, bindings binding.Bindings) (interface{}, error) {
interpreter := interpreter.NewInterpreter(nil, caller, bindings)
vm := interpreter.NewInterpreter(nil, bindings)
compiled, err := parser.Parse(statement)
if err != nil {
return nil, err
}
return interpreter.Execute(compiled, value)
return vm.Execute(compiled, value, interpreter.WithFunctionCaller(caller))
}

0 comments on commit c0febe2

Please sign in to comment.