CreateEnv creates a singleton CEL environment with the configured environment options.
()
| 156 | |
| 157 | // CreateEnv creates a singleton CEL environment with the configured environment options. |
| 158 | func (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. |
| 166 | func (c *compiler) CreatePolicyParser() (*policy.Parser, error) { |
nothing calls this directly
no test coverage detected