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

Function NewGlobalMacro

cel/macro.go:182–185  ·  view source on GitHub ↗

NewGlobalMacro creates a Macro for a global function with the specified arg count. Deprecated: use GlobalMacro

(function string, argCount int, expander MacroExpander)

Source from the content-addressed store, hash-verified

180//
181// Deprecated: use GlobalMacro
182func NewGlobalMacro(function string, argCount int, expander MacroExpander) Macro {
183 expand := adaptingExpander{expander}
184 return parser.NewGlobalMacro(function, argCount, expand.Expander)
185}
186
187// NewReceiverMacro creates a Macro for a receiver function matching the specified arg count.
188//

Callers 2

TestMacroInteropFunction · 0.70
TestCustomExistsMacroFunction · 0.70

Calls 1

NewGlobalMacroFunction · 0.92

Tested by 2

TestMacroInteropFunction · 0.56
TestCustomExistsMacroFunction · 0.56