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

Method AddFunctions

checker/env.go:145–151  ·  view source on GitHub ↗

AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.

(declarations ...*decls.FunctionDecl)

Source from the content-addressed store, hash-verified

143//
144// If there are overlapping declarations, the method will error.
145func (e *Env) AddFunctions(declarations ...*decls.FunctionDecl) error {
146 errMsgs := make([]errorMsg, 0)
147 for _, d := range declarations {
148 errMsgs = append(errMsgs, e.setFunction(d)...)
149 }
150 return formatError(errMsgs)
151}
152
153// newAttrResolution creates a new attribute resolution value.
154func newAttrResolution(ident *decls.VariableDecl, requiresDisambiguation bool) *attributeResolution {

Callers 15

programFunction · 0.95
newTestEnvFunction · 0.95
TestCheckFunction · 0.95
BenchmarkCheckFunction · 0.95
TestCheckErrorDataFunction · 0.95
TestVarsInheritanceFunction · 0.95
TestLazyCatalogSupplierFunction · 0.95
BenchmarkNewStdEnvFunction · 0.95

Calls 2

setFunctionMethod · 0.95
formatErrorFunction · 0.70

Tested by 15

programFunction · 0.76
newTestEnvFunction · 0.76
TestCheckFunction · 0.76
BenchmarkCheckFunction · 0.76
TestCheckErrorDataFunction · 0.76
TestVarsInheritanceFunction · 0.76
TestLazyCatalogSupplierFunction · 0.76
BenchmarkNewStdEnvFunction · 0.76