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

Function MemberOverload

common/decls/decls.go:601–605  ·  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 []*types.Type, resultType *types.Type,
	opts ...OverloadOpt)

Source from the content-addressed store, hash-verified

599// Note: function bindings should be commonly configured with Overload instances whereas operand traits and
600// strict-ness should be rare occurrences.
601func MemberOverload(overloadID string,
602 args []*types.Type, resultType *types.Type,
603 opts ...OverloadOpt) FunctionOpt {
604 return newOverload(overloadID, true, args, resultType, opts...)
605}
606
607func newOverload(overloadID string,
608 memberFunction bool, args []*types.Type, resultType *types.Type,

Callers 15

testDataFunction · 0.92
testCasesFunction · 0.92
testEnvsFunction · 0.92
TestCostFunction · 0.92
MemberOverloadFunction · 0.92
ProtoAsDeclarationFunction · 0.92
initFunction · 0.92
AsFunctionOptionMethod · 0.92
TestFunctionBindingsFunction · 0.70

Calls 1

newOverloadFunction · 0.85

Tested by 15

testDataFunction · 0.74
testCasesFunction · 0.74
testEnvsFunction · 0.74
TestCostFunction · 0.74
TestFunctionBindingsFunction · 0.56
TestFunctionMergeFunction · 0.56