README ¶ example02,总结play009(读取) 注意点 reflect.Type,和类型相关的都在这个里面找,比如有多少个字段,字段名称,字段类型是什么 reflect.Value,和值相关的用这个。比如这个字段的值是多少 struct和pointer在使用reflect的时候是不一样的。FieldByName()只能在struct使用。pointer的时候要用Elem() Value和Type才有Kind()方法,StructField是没有的 运行结果 参考资料 http://www.jianshu.com/p/0d346577d32f https://github.com/liguoqinjim/go-playground/tree/master/play009 Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Click to show internal directories. Click to hide internal directories.