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

Function NewExtension

common/ast/ast.go:538–544  ·  view source on GitHub ↗

NewExtension creates an Extension to be recorded on the SourceInfo.

(id string, version ExtensionVersion, components ...ExtensionComponent)

Source from the content-addressed store, hash-verified

536
537// NewExtension creates an Extension to be recorded on the SourceInfo.
538func NewExtension(id string, version ExtensionVersion, components ...ExtensionComponent) Extension {
539 return Extension{
540 ID: id,
541 Version: version,
542 Components: components,
543 }
544}
545
546// Extension represents a versioned, optional feature present in the AST that affects CEL component behavior.
547type Extension struct {

Callers 4

CheckFunction · 0.92
TestHasExtensionFunction · 0.92
TestConvertASTFunction · 0.92
ProtoToSourceInfoFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestHasExtensionFunction · 0.74
TestConvertASTFunction · 0.74