How to cast reflect.Value to its type?
type Cat struct { Age int } cat := reflect.ValueOf(obj) fmt.Println(cat.Type()) // Cat fmt.Println(Cat(cat).Age) //
Ok, I found it
reflect.Value has a function Interface() that converts it to interface{}
reflect.Value
Interface()
interface{}