Documentation
¶
Index ¶
- Variables
- func Embed(bp *build.Package, fset *token.FileSet, files []*ast.File, test bool, ...) (*ast.File, error)
- func EmbedFiles(pkgName string, dir string, fset *token.FileSet, files []*ast.File) (*ast.File, error)
- func GetImportPath(pkgName string, dir string) (string, error)
- func ParseModFile(file string) (*modfile.File, error)
- func TestMain(bp *build.Package) ([]byte, error)
- type CoverVar
- type LinkSym
- type Linkname
- type ListDriver
- type TestCover
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BuildMod string // BuildMod can be set readonly, vendor, or mod.
)
Functions ¶
func Embed ¶ added in v0.8.8
func Embed(bp *build.Package, fset *token.FileSet, files []*ast.File, test bool, xtest bool) (*ast.File, error)
Embed check package embed data
func EmbedFiles ¶ added in v0.9.1
func GetImportPath ¶
GetImportPath get import path from dir. - lookup go.mod and check modpath+dir+pkgname - use go list check if BuildMod == "mod".
Types ¶
type CoverVar ¶
CoverVar holds the name of the generated coverage variables targeting the named file.
type LinkSym ¶ added in v0.10.0
func ParseLinkname ¶ added in v0.10.0
ParseLinkname parse ast files go:linkname //go:linkname <localname> <importpath>.<name> //go:linkname <localname> <importpath>.<type>.<name> //go:linkname <localname> <importpath>.<(*type)>.<name> //go:linkname <localname> linkname indicate by runtime package
type ListDriver ¶
type ListDriver struct {
// contains filtered or unexported fields
}
ListDriver implement (*igop.Context).Lookup use go list
func (*ListDriver) Lookup ¶
func (d *ListDriver) Lookup(root string, path string) (dir string, found bool)
Lookup implement (*igop.Context).Lookup
func (*ListDriver) Parse ¶
func (d *ListDriver) Parse(root string) error
Parse parse deps by go list
Click to show internal directories.
Click to hide internal directories.