Documentation
¶
Index ¶
- func InitPkgFlag(pkg *Package)
- type Decl
- type DeclKind
- type Field
- type Fields
- type File
- type FuncDecl
- type FuncInfo
- type InterfaceType
- type Package
- type Packages
- func (c *Packages) Add(packages *load.Packages)
- func (p *Packages) CloneWithPackages(packages []*Package) *Packages
- func (p *Packages) Filter(f func(pkg *Package) bool) []*Package
- func (c *Packages) LoadPackage(pkgPath string) (*Package, bool, error)
- func (c *Packages) LoadPackages(pkgPaths []string) error
- func (c *Packages) Merge(pkgs *Packages, override bool)
- type VarInfo
- type VarRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitPkgFlag ¶ added in v1.1.1
func InitPkgFlag(pkg *Package)
Types ¶
type Decl ¶
type Decl struct {
Kind DeclKind
Ident *ast.Ident
Type ast.Expr // might be nil
Value ast.Expr // only for var, might be nil
ResolvedValueType types.Type
Decl *ast.GenDecl
// Pending var refs for rewrite
// for var only
VarRefs []*VarRef
// for Func
FuncDecl *FuncDecl
// for Type
Methods map[string]*FuncDecl
File *File
}
type File ¶
type InterfaceType ¶
type Package ¶
type Package struct {
LoadPackage *load.Package
Files []*File
Decls map[string]*Decl
Collected bool
// Main indicates whether
// the package is within main module
// NOTE: this does not consider go.mod
// boundaries, it only consider the
// prefix of the package path.
Main bool
// Initial indicates whether
// the packages are loaded via
// package args specified by user
Initial bool
// Xgo indicates whether
// the package is xgo/runtime
Xgo bool
// AllowInstrument indicates whether
// the package is allowed to be instrumented
AllowInstrument bool
}
type Packages ¶
type Packages struct {
Fset *token.FileSet
Packages []*Package
PackageByPath map[string]*Package
LoadOptions load.LoadOptions
}
func (*Packages) CloneWithPackages ¶ added in v1.1.1
func (*Packages) LoadPackage ¶ added in v1.1.1
func (*Packages) LoadPackages ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.