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

Function NewExtension

common/ast/ast.go:530–536  ·  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

528
529// NewExtension creates an Extension to be recorded on the SourceInfo.
530func NewExtension(id string, version ExtensionVersion, components ...ExtensionComponent) Extension {
531 return Extension{
532 ID: id,
533 Version: version,
534 Components: components,
535 }
536}
537
538// Extension represents a versioned, optional feature present in the AST that affects CEL component behavior.
539type 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