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