1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00

handle Ptr kind

This commit is contained in:
Владимир Фетисов 2019-09-30 20:42:05 +03:00
parent e61ea0e4e0
commit d0f8b69241

View File

@ -147,6 +147,10 @@ func Parse(input interface{}) core.Value {
t := reflect.TypeOf(value)
kind := t.Kind()
if kind == reflect.Ptr {
return Parse(v.Elem().Interface())
}
if kind == reflect.Slice || kind == reflect.Array {
size := v.Len()
arr := NewArray(size)