# Functions
CheckPackageErrors prints errors encountered loading pkgs and their dependencies, then exits with a non-zero status if any errors were found.
DeclareCoverVars attaches the required cover variables names to the files, to be used when annotating the files.
EnsureImport ensures that package p imports the named package.
FindVendor looks for the last non-terminating "vendor" path element in the given import path.
GoFilesPackage creates a package for building a collection of Go files (typically named on the command line).
No description provided by the author
InstallTargetDir reports the target directory for installing the command p.
LinkerDeps returns the list of linker-induced dependencies for main package p.
LoadImportWithFlags loads the package with the given import path and sets tool flags on that package.
LoadPackage does Load import, but without a parent package load contezt.
LoadPackageWithFlags is the same as LoadImportWithFlags but without a parent.
MatchPackage(pattern, cwd)(p) reports whether package p matches pattern in the working directory cwd.
PackageList returns the list of packages in the dag rooted at roots as visited in a depth-first post-order traversal.
PackagesAndErrors returns the packages named by the command line arguments 'patterns'.
PackagesAndErrorsOutsideModule is like PackagesAndErrors but runs in module-aware mode and ignores the go.mod file in the current directory or any parent directory, if there is one.
No description provided by the author
PrepareForCoverageBuild is a helper invoked for "go install -cover", "go run -cover", and "go build -cover" (but not used by "go test -cover").
ResolveEmbed resolves //go:embed patterns and returns only the file list.
ResolveImportPath returns the true meaning of path when it appears in parent.
SafeArg reports whether arg is a "safe" command-line argument, meaning that when it appears in a command-line, it probably doesn't have some special meaning other than its own name.
No description provided by the author
TestPackageList returns the list of packages in the dag rooted at roots as visited in a depth-first post-order traversal, including the test imports of the roots.
TestPackagesAndErrors returns three packages: - pmain, the package main corresponding to the test binary (running tests in ptest and pxtest).
TestPackagesFor is like TestPackagesAndErrors but it returns an error if the test packages or their dependencies have errors.
# Constants
GetTestDeps is for download (part of "go get") and indicates that test dependencies should be fetched too.
ResolveImport means that loadImport should do import path expansion.
ResolveModule is for download (part of "go get") and indicates that the module adjustment should be done, but not vendor adjustment.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
CoverSetup holds parameters related to coverage setup for a given package (covermode, etc).
CoverVar holds the name of the generated coverage variables targeting the named file.
An EmbedError indicates a problem with a go:embed directive.
A NoGoError indicates that no Go files for the package were applicable to the build for that package.
A Package describes a single package found in a directory.
A PackageError describes an error loading information about a package.
No description provided by the author
PackageOpts control the behavior of PackagesAndErrors and other package loading functions.
No description provided by the author
A PerPackageFlag is a command-line flag implementation (a flag.Value) that allows specifying different effective flags for different packages.
No description provided by the author
# Interfaces
ImportPathError is a type of error that prevents a package from being loaded for a given import path.
# Type aliases
An ImportStack is a stack of import paths, possibly with the suffix " (test)" appended.
No description provided by the author