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

Method Configure

ext/formatting.go:424–428  ·  view source on GitHub ↗

Configure implements the ASTValidatorConfigurer interface and augments the list of functions to skip during homogeneous aggregate literal type-checks.

(config cel.MutableValidatorConfig)

Source from the content-addressed store, hash-verified

422// Configure implements the ASTValidatorConfigurer interface and augments the list of functions to skip
423// during homogeneous aggregate literal type-checks.
424func (stringFormatValidator) Configure(config cel.MutableValidatorConfig) error {
425 functions := config.GetOrDefault(cel.HomogeneousAggregateLiteralExemptFunctions, []string{}).([]string)
426 functions = append(functions, "format")
427 return config.Set(cel.HomogeneousAggregateLiteralExemptFunctions, functions)
428}
429
430// Validate parses all literal format strings and type checks the format clause against the argument
431// at the corresponding ordinal within the list literal argument to the function, if one is specified.

Callers

nothing calls this directly

Calls 2

GetOrDefaultMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected