Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + var ToolDir = getToolDir() + func ArchChar(goarch string) (string, error) + func IsLocalImport(path string) bool + type Context struct + BuildTags []string + CgoEnabled bool + Compiler string + Dir string + GOARCH string + GOOS string + GOPATH string + GOROOT string + HasSubdir func(root, dir string) (rel string, ok bool) + InstallSuffix string + IsAbsPath func(path string) bool + IsDir func(path string) bool + JoinPath func(elem ...string) string + OpenFile func(path string) (io.ReadCloser, error) + ReadDir func(dir string) ([]fs.FileInfo, error) + ReleaseTags []string + SplitPathList func(list string) []string + ToolTags []string + UseAllFiles bool + var Default Context = defaultContext() + func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Package, error) + func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) + func (ctxt *Context) MatchFile(dir, name string) (match bool, err error) + func (ctxt *Context) SrcDirs() []string + type ImportMode uint + const AllowBinary + const FindOnly + const IgnoreVendor + const ImportComment + type MultiplePackageError struct + Dir string + Files []string + Packages []string + func (e *MultiplePackageError) Error() string + type NoGoError struct + Dir string + func (e *NoGoError) Error() string + type Package struct + AllTags []string + BinDir string + BinaryOnly bool + CFiles []string + CXXFiles []string + CgoCFLAGS []string + CgoCPPFLAGS []string + CgoCXXFLAGS []string + CgoFFLAGS []string + CgoFiles []string + CgoLDFLAGS []string + CgoPkgConfig []string + ConflictDir string + Dir string + Doc string + EmbedPatternPos map[string][]token.Position + EmbedPatterns []string + FFiles []string + GoFiles []string + Goroot bool + HFiles []string + IgnoredGoFiles []string + IgnoredOtherFiles []string + ImportComment string + ImportPath string + ImportPos map[string][]token.Position + Imports []string + InvalidGoFiles []string + MFiles []string + Name string + PkgObj string + PkgRoot string + PkgTargetRoot string + Root string + SFiles []string + SrcRoot string + SwigCXXFiles []string + SwigFiles []string + SysoFiles []string + TestEmbedPatternPos map[string][]token.Position + TestEmbedPatterns []string + TestGoFiles []string + TestImportPos map[string][]token.Position + TestImports []string + XTestEmbedPatternPos map[string][]token.Position + XTestEmbedPatterns []string + XTestGoFiles []string + XTestImportPos map[string][]token.Position + XTestImports []string + func Import(path, srcDir string, mode ImportMode) (*Package, error) + func ImportDir(dir string, mode ImportMode) (*Package, error) + func (p *Package) IsCommand() bool