Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructField ¶
type StructField struct { // The field's raw name Name string // The value of the json tag if provided, defaults to field name otherwise JSONKey string // Whether or not this field has been tagged as batchable Batchable bool // If this field is a struct, it will have nested fields inside. SubFields holds those nested fields. SubFields []StructField TypeInfo TypeInfo }
type StructInfo ¶
type StructInfo struct { Package string Name string Fields []StructField }
func ParseStruct ¶
func ParseStruct(pkgPath, structName string) (*StructInfo, error)
ParseStruct walks the pkgPath to gather all type declarations and then compares type names to structName to find the target struct, returning it's fields (and subfields if any exist) as a StructInfo.
Click to show internal directories.
Click to hide internal directories.