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

Method CreateEnv

tools/compiler/compiler.go:158–163  ·  view source on GitHub ↗

CreateEnv creates a singleton CEL environment with the configured environment options.

()

Source from the content-addressed store, hash-verified

156
157// CreateEnv creates a singleton CEL environment with the configured environment options.
158func (c *compiler) CreateEnv() (*cel.Env, error) {
159 c.doOnce.Do(func() {
160 c.env, c.envErr = cel.NewCustomEnv(c.envOptions...)
161 })
162 return c.env, c.envErr
163}
164
165// CreatePolicyParser creates a policy parser using the optionally configured parser options.
166func (c *compiler) CreatePolicyParser() (*policy.Parser, error) {

Callers

nothing calls this directly

Calls 1

NewCustomEnvFunction · 0.92

Tested by

no test coverage detected