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

Function NewReceiverVarArgMacro

parser/macro.go:85–95  ·  view source on GitHub ↗

NewReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count.

(function string, expander MacroExpander, opts ...MacroOpt)

Source from the content-addressed store, hash-verified

83
84// NewReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count.
85func NewReceiverVarArgMacro(function string, expander MacroExpander, opts ...MacroOpt) Macro {
86 m := &macro{
87 function: function,
88 expander: expander,
89 receiverStyle: true,
90 varArgStyle: true}
91 for _, opt := range opts {
92 m = opt(m)
93 }
94 return m
95}
96
97// Macro interface for describing the function signature to match and the MacroExpander to apply.
98//

Callers 4

ReceiverVarArgMacroFunction · 0.92
NewReceiverVarArgMacroFunction · 0.92
TestReceiverVarArgMacroFunction · 0.70
TestDocumentationFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestReceiverVarArgMacroFunction · 0.56
TestDocumentationFunction · 0.56