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

Function MemberOverload

cel/decls.go:313–315  ·  view source on GitHub ↗

MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of OverloadOpt options, the overload may also be configured with a binding, an operand trait, and to be non-strict. Note: function bindings should be commo

(overloadID string, args []*Type, resultType *Type, opts ...OverloadOpt)

Source from the content-addressed store, hash-verified

311// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
312// strict-ness should be rare occurrences.
313func MemberOverload(overloadID string, args []*Type, resultType *Type, opts ...OverloadOpt) FunctionOpt {
314 return decls.MemberOverload(overloadID, args, resultType, opts...)
315}
316
317// OverloadOpt is a functional option for configuring a function overload.
318type OverloadOpt = decls.OverloadOpt

Callers 15

CompileOptionsMethod · 0.92
CompileOptionsMethod · 0.92
TestProtosNonMatchFunction · 0.92
TestMathNonMatchFunction · 0.92
CompileOptionsMethod · 0.92
ExampleFunction · 0.92
CompileOptionsMethod · 0.92
exercise4Function · 0.92
updateMethod · 0.92
TestFunctionMergeFunction · 0.70
CompileOptionsMethod · 0.70

Calls 1

MemberOverloadFunction · 0.92

Tested by 14

TestProtosNonMatchFunction · 0.74
TestMathNonMatchFunction · 0.74
ExampleFunction · 0.74
CompileOptionsMethod · 0.74
TestFunctionMergeFunction · 0.56
TestEnvToConfigFunction · 0.56
TestEnvFromConfigFunction · 0.56
TestExtendStdlibFunctionFunction · 0.56
TestSubsetStdLibMergeFunction · 0.56
TestGlobalVarsFunction · 0.56