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)
| 52 | // |
| 53 | // Local bindings are not guaranteed to be evaluated before use. |
| 54 | func 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 | |
| 62 | const ( |
| 63 | celNamespace = "cel" |