utils.go:fromGenericAny() now supports also ListType and DictType
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user