My code is like so:
val := reflect.ValueOf(v) if val.Kind() == reflect.Ptr { val = val.Elem() v = val.Interface() // error arises here }
I get this error:
call of reflect.Value.Interface on zero Value
anybody know why?
Aucun commentaire:
Enregistrer un commentaire