MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Bindings

Function Bindings

ext/bindings.go:54–60  ·  view source on GitHub ↗

Bindings returns a cel.EnvOption to configure support for local variable bindings in expressions. # Cel.Bind Binds a simple identifier to an initialization expression which may be used in a subsequenct result expression. Bindings may also be nested within each other. cel.bind( , <initExp

(options ...BindingsOption)

Source from the content-addressed store, hash-verified

52//
53// Local bindings are not guaranteed to be evaluated before use.
54func Bindings(options ...BindingsOption) cel.EnvOption {
55 b := &celBindings{version: math.MaxUint32}
56 for _, o := range options {
57 b = o(b)
58 }
59 return cel.Lib(b)
60}
61
62const (
63 celNamespace = "cel"

Callers 15

TestSimpleVariablesFunction · 0.92
TestCompose_SourceInfoFunction · 0.92
TestCompose_UnnestFunction · 0.92
compileRuleMethod · 0.92
compileFunction · 0.92
optimizerEnvFunction · 0.92
initFunction · 0.92
evaluator.goFile · 0.92
TestBindingsFunction · 0.85
TestBindingsNonMatchFunction · 0.85
TestBindingsInvalidIdentFunction · 0.85

Calls 1

LibFunction · 0.92

Tested by 15

TestSimpleVariablesFunction · 0.74
TestCompose_SourceInfoFunction · 0.74
TestCompose_UnnestFunction · 0.74
compileRuleMethod · 0.74
compileFunction · 0.74
optimizerEnvFunction · 0.74
initFunction · 0.74
TestBindingsFunction · 0.68
TestBindingsNonMatchFunction · 0.68
TestBindingsInvalidIdentFunction · 0.68
BenchmarkBindingsFunction · 0.68
TestBlockEvalFunction · 0.68