The function parameter model has been modified to support the passing of named parameters
This commit is contained in:
@@ -10,7 +10,7 @@ type golangFunctor struct {
|
||||
f FuncTemplate
|
||||
}
|
||||
|
||||
func NewGolangFunctor(f FuncTemplate) *golangFunctor {
|
||||
func NewGolangFunctor2(f FuncTemplate) *golangFunctor {
|
||||
return &golangFunctor{f: f}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ func (functor *golangFunctor) TypeName() string {
|
||||
return "GoFunctor"
|
||||
}
|
||||
|
||||
func (functor *golangFunctor) Invoke(ctx ExprContext, name string, args []any) (result any, err error) {
|
||||
func (functor *golangFunctor) InvokeNamed(ctx ExprContext, name string, args map[string]any) (result any, err error) {
|
||||
return functor.f(ctx, name, args)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user