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

Function extensionOpt

tools/compiler/compiler.go:145–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145func extensionOpt() cel.EnvOption {
146 return func(e *cel.Env) (*cel.Env, error) {
147 envConfig := &env.Config{
148 Extensions: []*env.Extension{
149 {Name: "optional", Version: "latest"},
150 {Name: "bindings", Version: "latest"},
151 },
152 }
153 return e.Extend(cel.FromConfig(envConfig, ext.ExtensionOptionFactory))
154 }
155}
156
157// CreateEnv creates a singleton CEL environment with the configured environment options.
158func (c *compiler) CreateEnv() (*cel.Env, error) {

Callers 1

NewCompilerFunction · 0.85

Calls 2

FromConfigFunction · 0.92
ExtendMethod · 0.45

Tested by

no test coverage detected