Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonTagName ¶
func JsonTagName(f reflect.StructField) string
func StructFieldName ¶
func StructFieldName(f reflect.StructField) string
Types ¶
type NameFunc ¶
type NameFunc func(reflect.StructField) string
type StructDump ¶
type StructDump struct { StopTypes []string Output io.Writer NameFunc NameFunc // contains filtered or unexported fields }
func (StructDump) Dump ¶
func (sd StructDump) Dump(t reflect.Type)
Example ¶
package main import ( "reflect" "github.com/encero/structdump" ) func main() { type SimpleType struct { AnInt int AnString string AnStringSlice []string } dumper := structdump.StructDump{} dumper.Dump(reflect.TypeOf(SimpleType{})) }
Output: SimpleType.AnInt int SimpleType.AnString string SimpleType.AnStringSlice[] string
Click to show internal directories.
Click to hide internal directories.