vgo

package standard library
go1.11beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2018 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MustBeVgo = mustBeVgo()

	ModRoot string

	Target module.Version
)
View Source
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.
	`,
}
View Source
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.
	`,
}
View Source
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.
	`,
}
View Source
var InstallHook func([]string)

Call into "go install". Set by internal/work, which imports us.

Functions

func AddImports

func AddImports(gofiles []string)

func AllPackages

func AllPackages(pattern string) []string

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 BinDir

func BinDir() string

func Enabled

func Enabled() bool

func FindModulePath

func FindModulePath(dir string) (string, error)

Exported only for testing.

func FindModuleRoot

func FindModuleRoot(dir, limit string, legacyConfigOK bool) (root, file string)

Exported only for testing.

func ImportPaths

func ImportPaths(args []string) []string

func Init

func Init()

func InitMod

func InitMod()

func ListM

func ListM()

func ListMU

func ListMU()

func ListT

func ListT(pkgs []string)

func Lookup

func Lookup(parentPath, path string) (dir, realPath string, err error)

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

func MatchPackages(pattern string) []string

MatchPackages returns a list of package paths matching pattern (see go help packages for pattern syntax).

func ModInfoProg

func ModInfoProg(info string) []byte

func PackageBuildInfo

func PackageBuildInfo(path string, deps []string) string

func PackageModuleInfo

func PackageModuleInfo(path string) *modinfo.ModulePublic

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL