I want to print out (or otherwise ascertain) the type of some variable in my program.Is there a good way to do it?By good, I mean a way that works, even if it means intentionally throwing compiler err
目录reflect 反射包TypeOf(i) 和 ValueOf(i)案例1:获取变量的类别和类型信息案例2:修改基本数据类型变量的值案例3:通过反射获取结构体的字段名、字段类型和字段的值小结reflect 反射包