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

Function NewGlobalVarArgMacro

parser/macro.go:73–82  ·  view source on GitHub ↗

NewGlobalVarArgMacro creates a Macro for a global function with a variable arg count.

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

Source from the content-addressed store, hash-verified

71
72// NewGlobalVarArgMacro creates a Macro for a global function with a variable arg count.
73func NewGlobalVarArgMacro(function string, expander MacroExpander, opts ...MacroOpt) Macro {
74 m := &macro{
75 function: function,
76 expander: expander,
77 varArgStyle: true}
78 for _, opt := range opts {
79 m = opt(m)
80 }
81 return m
82}
83
84// NewReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count.
85func NewReceiverVarArgMacro(function string, expander MacroExpander, opts ...MacroOpt) Macro {

Callers 3

GlobalVarArgMacroFunction · 0.92
NewGlobalVarArgMacroFunction · 0.92
parser_test.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected