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

Function ClearMacros

cel/options.go:162–167  ·  view source on GitHub ↗

ClearMacros options clears all parser macros. Clearing macros will ensure CEL expressions can only contain linear evaluation paths, as comprehensions such as `all` and `exists` are enabled only via macros.

()

Source from the content-addressed store, hash-verified

160// Clearing macros will ensure CEL expressions can only contain linear evaluation paths, as
161// comprehensions such as `all` and `exists` are enabled only via macros.
162func ClearMacros() EnvOption {
163 return func(e *Env) (*Env, error) {
164 e.macros = NoMacros
165 return e, nil
166 }
167}
168
169// CustomTypeAdapter swaps the default types.Adapter implementation with a custom one.
170//

Callers 2

initFunction · 0.92
TestMacroSubsetFunction · 0.85

Calls

no outgoing calls

Tested by 2

initFunction · 0.74
TestMacroSubsetFunction · 0.68