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

Function DisableDeclaration

common/decls/decls.go:482–491  ·  view source on GitHub ↗

DisableDeclaration indicates that the function declaration should be disabled, but the runtime function binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations of function declarations while still preserving the runtime behavior for previously compiled exp

(value bool)

Source from the content-addressed store, hash-verified

480// binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations
481// of function declarations while still preserving the runtime behavior for previously compiled expressions.
482func DisableDeclaration(value bool) FunctionOpt {
483 return func(fn *FunctionDecl) (*FunctionDecl, error) {
484 if value {
485 fn.state = declarationDisabled
486 } else {
487 fn.state = declarationEnabled
488 }
489 return fn, nil
490 }
491}
492
493// SingletonUnaryBinding creates a singleton function definition to be used for all function overloads.
494//

Callers 4

DisableDeclarationFunction · 0.92
initFunction · 0.92

Calls

no outgoing calls

Tested by 2