Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRuntimeType ¶ added in v1.2.0
GetRuntimeType will fetch a pointer for the runtime._type value of the originating object this reflect.Type represents. This is possible because the reflect package returns the value of an interface{}'s Eface.Type cast as their copy of runtime._type. So the Eface.Data value for this reflected type will be the underlying runtime type this was from.
func GetStructFields ¶
func GetStructFields(v interface{}) []reflect.StructField
GetStructFields will fetch struct field information for any struct-type 'v', caching the results between consecutive calls. For this reason you should treat returned fields as READ-ONLY. This method is useful if you expect to be regularly reflecting and iterating a type's struct fields.
func GetStructFieldsByType ¶ added in v1.1.0
func GetStructFieldsByType(t reflect.Type) []reflect.StructField
GetStructFieldsByType will fetch struct field information for any reflected struct-type 't', caching the results between consecutive calls. For this reason you should treat returned fields as READ-ONLY. This method is useful if you expect to be regularly reflecting and iterating a type's struct fields.
func IsValidStructTag ¶
IsValidStructTag will return whether tag value is valid for use, i.e. not empty or marked as ignore '-'.