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

Function MemberOverload

cel/decls.go:317–319  ·  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

315// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
316// strict-ness should be rare occurrences.
317func MemberOverload(overloadID string, args []*Type, resultType *Type, opts ...OverloadOpt) FunctionOpt {
318 return decls.MemberOverload(overloadID, args, resultType, opts...)
319}
320
321// OverloadOpt is a functional option for configuring a function overload.
322type 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

Calls 1

MemberOverloadFunction · 0.92

Tested by 15

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