Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Parse imports within files OptParseImports = 1 // Parse structs within files OptParseStructs = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
File represents a parsed Go source file
func ParseFile ¶
ParseFile parses the file at path. All options will be set to their default values.
func ParseFileOptions ¶
ParseFileOptions parses the file at path with options.
func ParseSource ¶
ParseSource parses src. src may be of type a string, []byte, or io.Reader. All options will be set to their default values.
func ParseSourceOptions ¶
ParseSourceOptions parses src with options. src may be of type a string, []byte, or io.Reader.
type Struct ¶
type Struct struct { Name string Comments []string Fields []StructField }
Struct represents a struct type definition parsed from a Go source file
type StructField ¶
type StructField struct { Name string Type string Doc []string Comments []string Tag reflect.StructTag RawTag string // A field definition may contain an embedded struct type definition StructType *Struct }
StructField represents a field definition, within a struct type definition, parsed from a Go source file
Click to show internal directories.
Click to hide internal directories.