NewReceiverMacro creates a Macro for a receiver function matching the specified arg count.
(function string, argCount int, expander MacroExpander, opts ...MacroOpt)
| 58 | |
| 59 | // NewReceiverMacro creates a Macro for a receiver function matching the specified arg count. |
| 60 | func NewReceiverMacro(function string, argCount int, expander MacroExpander, opts ...MacroOpt) Macro { |
| 61 | m := ¯o{ |
| 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. |
| 73 | func NewGlobalVarArgMacro(function string, expander MacroExpander, opts ...MacroOpt) Macro { |
no outgoing calls
no test coverage detected