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

Function DisableDeclaration

common/decls/decls.go:472–481  ·  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

470// binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations
471// of function declarations while still preserving the runtime behavior for previously compiled expressions.
472func DisableDeclaration(value bool) FunctionOpt {
473 return func(fn *FunctionDecl) (*FunctionDecl, error) {
474 if value {
475 fn.state = declarationDisabled
476 } else {
477 fn.state = declarationEnabled
478 }
479 return fn, nil
480 }
481}
482
483// SingletonUnaryBinding creates a singleton function definition to be used for all function overloads.
484//

Callers 4

DisableDeclarationFunction · 0.92
initFunction · 0.92

Calls

no outgoing calls

Tested by 2