Documentation ¶
Overview ¶
Package structs provides functions for struct conversion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapField ¶
MapField retrieves struct field as map[name/tag]*Field from <pointer>, and returns it.
The parameter <recursive> specifies whether retrieving the struct field recursively.
Note that it only retrieves the exported attributes with first letter up-case from struct.
func TagMapField ¶
TagMapField retrieves struct tags as map[tag]*Field from <pointer>, and returns it.
The parameter <recursive> specifies whether retrieving the struct field recursively.
Note that it only retrieves the exported attributes with first letter up-case from struct.
func TagMapName ¶
TagMapName retrieves struct tags as map[tag]attribute from <pointer>, and returns it.
The parameter <recursive> specifies whether retrieving the struct field recursively.
Note that it only retrieves the exported attributes with first letter up-case from struct.
Types ¶
type Field ¶
type Field struct { *structs.Field // Retrieved tag name. There might be more than one tags in the field, // but only one can be retrieved according to calling function rules. Tag string }
Field is alias of structs.Field.