Documentation ¶
Index ¶
- Variables
- func AddImports(gofiles []string)
- func AllPackages(pattern string) []string
- func BinDir() string
- func Enabled() bool
- func FindModulePath(dir string) (string, error)
- func FindModuleRoot(dir, limit string, legacyConfigOK bool) (root, file string)
- func ImportPaths(args []string) []string
- func Init()
- func InitMod()
- func ListM()
- func ListMU()
- func ListT(pkgs []string)
- func Lookup(parentPath, path string) (dir, realPath string, err error)
- func MatchALL() []string
- func MatchAll() []string
- func MatchPackages(pattern string) []string
- func ModInfoProg(info string) []byte
- func PackageBuildInfo(path string, deps []string) string
- func PackageModuleInfo(path string) *modinfo.ModulePublic
Constants ¶
This section is empty.
Variables ¶
var ( MustBeVgo = mustBeVgo() ModRoot string Target module.Version )
var CmdGet = &base.Command{
UsageLine: "get [build flags] [packages]",
Short: "download and install versioned modules and dependencies",
Long: `
Get downloads the latest versions of modules containing the named packages,
along with the versions of the dependencies required by those modules
(not necessarily the latest ones).
It then installs the named packages, like 'go install'.
The -u flag causes get to download the latest version of dependencies as well.
Each package being updated can be suffixed with @version to specify
the desired version. Specifying a version older than the one currently
in use causes a downgrade, which may in turn downgrade other
modules using that one, to keep everything consistent.
TODO: Make this documentation better once the semantic dust settles.
`,
}
var CmdVendor = &base.Command{
UsageLine: "vendor [-v]",
Short: "vendor dependencies of current module",
Long: `
Vendor resets the module's vendor directory to include all
packages needed to build and test all packages in the module
and their dependencies.
The -v flag causes vendor to print to standard error the
module paths of the modules processed and the import paths
of the packages copied.
`,
}
var CmdVerify = &base.Command{
UsageLine: "verify",
Run: runVerify,
Short: "verify downloaded modules against expected hashes",
Long: `
Verify checks that the dependencies of the current module,
which are stored in a local downloaded source cache,
have not been modified since being downloaded.
If all the modules are unmodified, verify prints
all modules verified
and exits successfully (status 0). Otherwise, verify reports
which modules have been changed and exits with a non-zero status.
`,
}
var InstallHook func([]string)
Call into "go install". Set by internal/work, which imports us.
Functions ¶
func AddImports ¶
func AddImports(gofiles []string)
func AllPackages ¶
AllPackages returns all the packages that can be found under the $GOPATH directories and $GOROOT matching pattern. The pattern is either "all" (all packages), "std" (standard packages), "cmd" (standard commands), or a path including "...".
func FindModuleRoot ¶
Exported only for testing.
func ImportPaths ¶
func MatchALL ¶
func MatchALL() []string
MatchALL returns a list of the packages matching the pattern "ALL". The pattern "ALL" is like "all" but looks at all source files, even ones that would be ignored by current build tag settings. That's useful for identifying which packages to include in a vendor directory.
func MatchAll ¶
func MatchAll() []string
MatchAll returns a list of the packages matching the pattern "all". We redefine "all" to mean start with the packages in the current module and then follow imports into other modules to add packages imported (directly or indirectly) as part of builds in this module. It does not include packages in other modules that are not needed by builds of this module.
func MatchPackages ¶
MatchPackages returns a list of package paths matching pattern (see go help packages for pattern syntax).
func ModInfoProg ¶
func PackageBuildInfo ¶
func PackageModuleInfo ¶
func PackageModuleInfo(path string) *modinfo.ModulePublic
Types ¶
This section is empty.