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

Function compileRegex

cel/validator.go:329–333  ·  view source on GitHub ↗
(_ *Env, _, arg ast.Expr)

Source from the content-addressed store, hash-verified

327}
328
329func compileRegex(_ *Env, _, arg ast.Expr) error {
330 pattern := arg.AsLiteral().Value().(string)
331 _, err := regexp.Compile(pattern)
332 return err
333}
334
335type homogeneousAggregateLiteralValidator struct{}
336

Callers

nothing calls this directly

Calls 3

ValueMethod · 0.65
AsLiteralMethod · 0.65
CompileMethod · 0.65

Tested by

no test coverage detected