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

Method AddFunctions

checker/env.go:126–132  ·  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

124//
125// If there are overlapping declarations, the method will error.
126func (e *Env) AddFunctions(declarations ...*decls.FunctionDecl) error {
127 errMsgs := make([]errorMsg, 0)
128 for _, d := range declarations {
129 errMsgs = append(errMsgs, e.setFunction(d)...)
130 }
131 return formatError(errMsgs)
132}
133
134// newAttrResolution creates a new attribute resolution value.
135func newAttrResolution(ident *decls.VariableDecl, requiresDisambiguation bool) *attributeResolution {

Callers 15

programFunction · 0.95
newTestEnvFunction · 0.95
TestCheckFunction · 0.95
BenchmarkCheckFunction · 0.95
TestCheckErrorDataFunction · 0.95
BenchmarkNewStdEnvFunction · 0.95
newStdEnvFunction · 0.95
TestCostFunction · 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
BenchmarkNewStdEnvFunction · 0.76
newStdEnvFunction · 0.76
TestCostFunction · 0.76