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

Function DisableDeclaration

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

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

Callers 4

DisableDeclarationFunction · 0.92
initFunction · 0.92

Calls

no outgoing calls

Tested by 2