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

Function NewReceiverMacro

parser/macro.go:60–70  ·  view source on GitHub ↗

NewReceiverMacro creates a Macro for a receiver function matching the specified arg count.

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

Source from the content-addressed store, hash-verified

58
59// NewReceiverMacro creates a Macro for a receiver function matching the specified arg count.
60func NewReceiverMacro(function string, argCount int, expander MacroExpander, opts ...MacroOpt) Macro {
61 m := &macro{
62 function: function,
63 argCount: argCount,
64 expander: expander,
65 receiverStyle: true}
66 for _, opt := range opts {
67 m = opt(m)
68 }
69 return m
70}
71
72// NewGlobalVarArgMacro creates a Macro for a global function with a variable arg count.
73func NewGlobalVarArgMacro(function string, expander MacroExpander, opts ...MacroOpt) Macro {

Callers 3

ReceiverMacroFunction · 0.92
NewReceiverMacroFunction · 0.92
macro.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected