utils.go:fromGenericAny() now supports also ListType and DictType

This commit is contained in:
2024-05-19 01:21:06 +02:00
parent 2b184cf3f2
commit 9bd4a0ba23
+7 -1
View File
@@ -35,7 +35,7 @@ func IsList(v any) (ok bool) {
}
func IsDict(v any) (ok bool) {
_, ok = v.(map[any]any)
_, ok = v.(*DictType)
return ok
}
@@ -147,6 +147,12 @@ func fromGenericAny(v any) (exprAny any, ok bool) {
if exprAny, ok = anyFloat(v); ok {
return
}
if exprAny, ok = v.(*DictType); ok {
return
}
if exprAny, ok = v.(*ListType); ok {
return
}
return
}