refactored data-types to reduce plugin sizes

This commit is contained in:
2026-06-08 07:02:56 +02:00
parent fec7cc546c
commit b6da9bcad4
90 changed files with 1039 additions and 803 deletions
+5 -3
View File
@@ -9,6 +9,8 @@ import (
"io"
"git.portale-stac.it/go-pkg/expr/kern"
"git.portale-stac.it/go-pkg/expr/types/boolean"
"git.portale-stac.it/go-pkg/expr/types/dict"
)
const (
@@ -32,8 +34,8 @@ func parseRunArgs(localCtx kern.ExprContext, args map[string]any) (it kern.Itera
}
}
var vars *kern.DictType
if vars, ok = args[iterParamVars].(*kern.DictType); !ok && args[iterParamVars] != nil {
var vars *dict.DictType
if vars, ok = args[iterParamVars].(*dict.DictType); !ok && args[iterParamVars] != nil {
err = fmt.Errorf("paramter %q must be a dictionary, passed %v [%s]", iterParamVars, args[iterParamVars], kern.TypeName(args[iterParamVars]))
return
}
@@ -73,7 +75,7 @@ func runFunc(ctx kern.ExprContext, name string, args map[string]any) (result any
break
} else {
var success bool
if success, ok = kern.ToBool(v); !success || !ok {
if success, ok = boolean.ToBool(v); !success || !ok {
break
}
}