Documentation ¶
Overview ¶
Package parser provides code to parse go files, type-check them, extract the types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder lets you add all the go files in all the packages that you care about, then constructs the type source data.
func (*Builder) AddBuildTags ¶
AddBuildTags adds the specified build tags to the parse context.
func (*Builder) AddDir ¶
AddDir adds an entire directory, scanning it for go files. 'dir' should have a single go package in it. GOPATH, GOROOT, and the location of your go binary (`which go`) will all be searched if dir doesn't literally resolve.
func (*Builder) AddDirRecursive ¶ added in v0.4.0
AddDirRecursive is just like AddDir, but it also recursively adds subdirectories; it returns an error only if the path couldn't be resolved; any directories recursed into without go source are ignored.