Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParsedStruct ¶
type ParsedStruct struct { TypeName string Fields []StructField Doc *ast.CommentGroup // line comments; or nil }
ParsedStruct represents struct info
type ParsedStructs ¶
type ParsedStructs map[string]ParsedStruct
ParsedStructs is a map from struct type name to list of fields
func GetStructsInFile ¶
func GetStructsInFile(filePath string) (*loader.PackageInfo, ParsedStructs, error)
GetStructsInFile lists all structures in file passed and returns them with all fields
type StructField ¶
type StructField struct {
// contains filtered or unexported fields
}
StructField represents one field in struct
func (StructField) Name ¶
func (sf StructField) Name() string
func (StructField) Tag ¶
func (sf StructField) Tag() reflect.StructTag
func (StructField) Type ¶
func (sf StructField) Type() types.Type
Click to show internal directories.
Click to hide internal directories.