The function parameter model has been modified to support the passing of named parameters

This commit is contained in:
2024-07-28 18:49:08 +02:00
parent ab06702e5e
commit 9070b5c9cc
34 changed files with 520 additions and 347 deletions
+2 -2
View File
@@ -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)
}