refactored data-types to reduce plugin sizes
This commit is contained in:
+8
-5
@@ -7,7 +7,10 @@ package util
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/types"
|
||||
"git.portale-stac.it/go-pkg/expr/types/array"
|
||||
"git.portale-stac.it/go-pkg/expr/types/dict"
|
||||
"git.portale-stac.it/go-pkg/expr/types/float"
|
||||
)
|
||||
|
||||
func IsFunc(v any) bool {
|
||||
@@ -22,16 +25,16 @@ func FromGenericAny(v any) (exprAny any, ok bool) {
|
||||
if exprAny, ok = v.(string); ok {
|
||||
return
|
||||
}
|
||||
if exprAny, ok = kern.AnyInteger(v); ok {
|
||||
if exprAny, ok = types.AnyInteger(v); ok {
|
||||
return
|
||||
}
|
||||
if exprAny, ok = kern.AnyFloat(v); ok {
|
||||
if exprAny, ok = float.AnyFloat(v); ok {
|
||||
return
|
||||
}
|
||||
if exprAny, ok = v.(*kern.DictType); ok {
|
||||
if exprAny, ok = v.(*dict.DictType); ok {
|
||||
return
|
||||
}
|
||||
if exprAny, ok = v.(*kern.ListType); ok {
|
||||
if exprAny, ok = v.(*array.ListType); ok {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user