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

Method Validate

common/env/env.go:330–338  ·  view source on GitHub ↗

Validate validates the context-variable configuration is well-formed.

()

Source from the content-addressed store, hash-verified

328
329// Validate validates the context-variable configuration is well-formed.
330func (ctx *ContextVariable) Validate() error {
331 if ctx == nil {
332 return nil
333 }
334 if ctx.TypeName == "" {
335 return errors.New("invalid context variable: missing type name")
336 }
337 return nil
338}
339
340// NewFunction creates a serializable function and overload set.
341func NewFunction(name string, overloads ...*Overload) *Function {

Callers 1

Calls 1

NewMethod · 0.80

Tested by 1