Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builtin ¶
type Config ¶
type Config struct { PackageSrc map[string][]byte SrcMap map[string][]byte CheckFuncs bool CheckImports bool NoConcurrency bool Tests bool // TypesInfo specifies what, if any, package info to load TypesInfo TypesInfo // ImportsTypesInfo speifies whether or not to also load type info for imported packages ImportsTypesInfo bool }
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func (*Importer) ImportFrom ¶
type Package ¶
type Package struct { *types.Package // Fset is the FileSet used for parsing Fset *token.FileSet // Info holds type info about the package Info *types.Info // Package holds type and package info for type-checked imports Imports map[string]*Package // Files maps the package file tbasenames to their parsed ast files Files map[string]*ast.File }
Package holds type and package info for a type-checked package. NOTE: All fields except the underlying types.Package are optional.
func NewPackage ¶
func NewPackage(pkg *types.Package, fset *token.FileSet, files map[string]*ast.File, info *types.Info, imports map[string]*Package) *Package
NewPackage is equivalent to &Package{Package: pkg, Fset: fset, Types: info, Imports: imports} All arguments except pkg are optional. NewPackage panics if pkg is nil.
type TypesInfo ¶
type TypesInfo uint
TypesInfo specifies what, if any, types.Info to load
const ( // TypesInfoTypes loads types.Info.Types TypesInfoTypes TypesInfo = 1 << iota // TypesInfoDefs loads types.Info.Defs TypesInfoDefs // TypesInfoUses loads types.Info.Uses TypesInfoUses // TypesInfoImplicits loads types.Info.Implicits TypesInfoImplicits // TypesInfoSelections loads types.Info.Selections TypesInfoSelections // TypesInfoScopes loads types.Info.Scopes TypesInfoScopes // TypesInfoInitOrder loads types.Info.InitOrder TypesInfoInitOrder // TypesInfoAll loads all types.Info fields TypesInfoAll = TypesInfoTypes | TypesInfoDefs | TypesInfoUses | TypesInfoImplicits | TypesInfoSelections | TypesInfoScopes | TypesInfoInitOrder )
Click to show internal directories.
Click to hide internal directories.