Documentation ¶
Overview ¶
Package load loads packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMetaPackage ¶
IsMetaPackage checks if name is a reserved package name that expands to multiple packages.
Types ¶
type Context ¶
type Context struct { // BuildContext is the build context to use. BuildContext build.Context // GOROOTsrc is the location of the src directory in GOROOT. // At this time, it's used only in MatchPackages to skip // GOOROOT/src entry from BuildContext.SrcDirs output. GOROOTsrc string }
Context specifies values for operation of ImportPaths that would otherwise come from cmd/go/internal/cfg package.
This is a construct added for gotool purposes and doesn't have an equivalent upstream in cmd/go.
func (*Context) ImportPaths ¶
ImportPaths returns the import paths to use for the given command line.
func (*Context) ImportPathsNoDotExpansion ¶
ImportPathsNoDotExpansion returns the import paths to use for the given command line, but it does no ... expansion.
func (*Context) MatchPackages ¶
MatchPackages returns a list of package paths matching pattern (see go help packages for pattern syntax).
func (*Context) MatchPackagesInFS ¶
MatchPackagesInFS returns a list of package paths matching pattern, which must begin with ./ or ../ (see go help packages for pattern syntax).