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
+4 -2
View File
@@ -12,6 +12,8 @@ import (
"git.portale-stac.it/go-pkg/expr/kern"
"git.portale-stac.it/go-pkg/expr/scan"
"git.portale-stac.it/go-pkg/expr/types"
"git.portale-stac.it/go-pkg/expr/types/float"
"git.portale-stac.it/go-pkg/expr/util"
)
@@ -50,9 +52,9 @@ func EvalStringV(source string, args []Arg) (result any, err error) {
} else {
err = fmt.Errorf("invalid function specification: %q", arg.Name)
}
} else if integer, ok := kern.AnyInteger(arg.Value); ok {
} else if integer, ok := types.AnyInteger(arg.Value); ok {
ctx.SetVar(arg.Name, integer)
} else if float, ok := kern.AnyFloat(arg.Value); ok {
} else if float, ok := float.AnyFloat(arg.Value); ok {
ctx.SetVar(arg.Name, float)
} else if _, ok := arg.Value.(string); ok {
ctx.SetVar(arg.Name, arg.Value)