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

Method ToConfig

cel/validator.go:295–297  ·  view source on GitHub ↗

ToConfig converts the ASTValidator to an env.Validator specifying the validator name.

()

Source from the content-addressed store, hash-verified

293
294// ToConfig converts the ASTValidator to an env.Validator specifying the validator name.
295func (v formatValidator) ToConfig() *env.Validator {
296 return env.NewValidator(v.Name())
297}
298
299// Validate searches the AST for uses of a given function name with a constant argument and performs a check
300// on whether the argument is a valid literal value.

Callers

nothing calls this directly

Calls 2

NameMethod · 0.95
NewValidatorFunction · 0.92

Tested by

no test coverage detected