refactored data-types to reduce plugin sizes
This commit is contained in:
+4
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user