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

Function DisableDeclaration

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

501// binding should be provided. Marking a function as runtime-only is a safe way to manage deprecations
502// of function declarations while still preserving the runtime behavior for previously compiled expressions.
503func DisableDeclaration(value bool) FunctionOpt {
504 return func(fn *FunctionDecl) (*FunctionDecl, error) {
505 if value {
506 fn.state = declarationDisabled
507 } else {
508 fn.state = declarationEnabled
509 }
510 return fn, nil
511 }
512}
513
514// SingletonUnaryBinding creates a singleton function definition to be used for all function overloads.
515//

Callers 4

DisableDeclarationFunction · 0.92
initStandardFunction · 0.92

Calls

no outgoing calls

Tested by 2