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

Function MaxNestedExpressions

policy/compiler.go:187–195  ·  view source on GitHub ↗

MaxNestedExpressions limits the number of variable and nested rule expressions during compilation. Defaults to 100 if not set.

(limit int)

Source from the content-addressed store, hash-verified

185//
186// Defaults to 100 if not set.
187func MaxNestedExpressions(limit int) CompilerOption {
188 return func(c *compiler) error {
189 if limit <= 0 {
190 return fmt.Errorf("nested expression limit must be non-negative, non-zero value: %d", limit)
191 }
192 c.maxNestedExpressions = limit
193 return nil
194 }
195}
196
197// MatchCompiler is an interface that provides the necessary functionality for compiling the output
198// of a match.

Callers 2

helper_test.goFile · 0.85

Calls

no outgoing calls

Tested by 1