Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const GetTestDeps + const ResolveImport + const ResolveModule + var TestMainDeps = []string + func CheckPackageErrors(pkgs []*Package) + func ClearPackageCache() + func ClearPackageCachePartial(args []string) + func FindVendor(path string) (index int, ok bool) + func LinkerDeps(p *Package) []string + func MatchPackage(pattern, cwd string) func(*Package) bool + func ResolveEmbed(dir string, patterns []string) ([]string, error) + func ResolveImportPath(parent *Package, path string) (found string) + func SafeArg(name string) bool + type CoverVar struct + File string + Var string + type EmbedError struct + Err error + Pattern string + func (e *EmbedError) Error() string + func (e *EmbedError) Unwrap() error + type ImportPathError interface + ImportPath func() string + func ImportErrorf(path, format string, args ...any) ImportPathError + type ImportStack []string + func (s *ImportStack) Copy() []string + func (s *ImportStack) Pop() + func (s *ImportStack) Push(p string) + func (s *ImportStack) Top() string + type NoGoError struct + Package *Package + func (e *NoGoError) Error() string + type Package struct + Internal PackageInternal + func GoFilesPackage(ctx context.Context, opts PackageOpts, gofiles []string) *Package + func LoadImport(ctx context.Context, opts PackageOpts, path, srcDir string, parent *Package, ...) *Package + func LoadImportWithFlags(path, srcDir string, parent *Package, stk *ImportStack, ...) *Package + func PackageList(roots []*Package) []*Package + func PackagesAndErrors(ctx context.Context, opts PackageOpts, patterns []string) []*Package + func PackagesAndErrorsOutsideModule(ctx context.Context, opts PackageOpts, args []string) ([]*Package, error) + func ReloadPackageNoFlags(arg string, stk *ImportStack) *Package + func TestPackageList(ctx context.Context, opts PackageOpts, roots []*Package) []*Package + func TestPackagesAndErrors(ctx context.Context, opts PackageOpts, p *Package, cover *TestCover) (pmain, ptest, pxtest *Package) + func TestPackagesFor(ctx context.Context, opts PackageOpts, p *Package, cover *TestCover) (pmain, ptest, pxtest *Package, err error) + func (p *Package) AllFiles() []string + func (p *Package) DefaultExecName() string + func (p *Package) Desc() string + func (p *Package) InternalAllGoFiles() []string + func (p *Package) InternalGoFiles() []string + func (p *Package) InternalXGoFiles() []string + func (p *Package) IsTestOnly() bool + func (p *Package) Resolve(imports []string) []string + func (p *Package) UsesCgo() bool + func (p *Package) UsesSwig() bool + type PackageError struct + Err error + Hard bool + ImportStack []string + IsImportCycle bool + Pos string + func (p *PackageError) Error() string + func (p *PackageError) MarshalJSON() ([]byte, error) + func (p *PackageError) Unwrap() error + type PackageInternal struct + Asmflags []string + Build *build.Package + BuildInfo string + CmdlineFiles bool + CmdlinePkg bool + CmdlinePkgLiteral bool + CompiledImports []string + CoverMode string + CoverVars map[string]*CoverVar + Embed map[string][]string + ExeName string + ForceLibrary bool + FuzzInstrument bool + Gccgoflags []string + Gcflags []string + GobinSubdir bool + Imports []*Package + Ldflags []string + Local bool + LocalPrefix string + OmitDebug bool + OrigImportPath string + RawImports []string + TestmainGo *[]byte + type PackageOpts struct + IgnoreImports bool + LoadVCS bool + MainOnly bool + ModResolveTests bool + type PackagePublic struct + BinaryOnly bool + BuildID string + CFiles []string + CXXFiles []string + CgoCFLAGS []string + CgoCPPFLAGS []string + CgoCXXFLAGS []string + CgoFFLAGS []string + CgoFiles []string + CgoLDFLAGS []string + CgoPkgConfig []string + CompiledGoFiles []string + ConflictDir string + DepOnly bool + Deps []string + DepsErrors []*PackageError + Dir string + Doc string + EmbedFiles []string + EmbedPatterns []string + Error *PackageError + Export string + FFiles []string + ForTest string + GoFiles []string + Goroot bool + HFiles []string + IgnoredGoFiles []string + IgnoredOtherFiles []string + ImportComment string + ImportMap map[string]string + ImportPath string + Imports []string + Incomplete bool + InvalidGoFiles []string + MFiles []string + Match []string + Module *modinfo.ModulePublic + Name string + Root string + SFiles []string + Shlib string + Stale bool + StaleReason string + Standard bool + SwigCXXFiles []string + SwigFiles []string + SysoFiles []string + Target string + TestEmbedFiles []string + TestEmbedPatterns []string + TestGoFiles []string + TestImports []string + XTestEmbedFiles []string + XTestEmbedPatterns []string + XTestGoFiles []string + XTestImports []string + type PerPackageFlag struct + var BuildAsmflags PerPackageFlag + var BuildGccgoflags PerPackageFlag + var BuildGcflags PerPackageFlag + var BuildLdflags PerPackageFlag + func (f *PerPackageFlag) For(p *Package) []string + func (f *PerPackageFlag) Present() bool + func (f *PerPackageFlag) Set(v string) error + func (f *PerPackageFlag) String() string + type TargetDir int + const StalePath + const ToBin + const ToTool + func InstallTargetDir(p *Package) TargetDir + type TestCover struct + DeclVars func(*Package, ...string) map[string]*CoverVar + Local bool + Mode string + Paths []string + Pkgs []*Package + Vars []coverInfo