Documentation ¶
Overview ¶
disable this behavior. The following external tools are supported: glide, godep, vndr, govend, gb, gvt, glock.
Any dependencies that are not constrained by external configuration use the GOPATH analysis below.
By default, the dependencies are resolved over the network. A version will be selected from the versions available from the upstream source per the following algorithm:
- Tags conforming to semver (sorted by semver rules)
- Default branch(es) (sorted lexicographically)
- Non-semver tags (sorted lexicographically)
An alternate mode can be activated by passing -gopath. In this mode, the version of each dependency will reflect the current state of the GOPATH. If a dependency doesn't exist in the GOPATH, a version will be selected based on the above network version selection algorithm.
A Gopkg.toml file will be written with inferred version constraints for all direct dependencies. Gopkg.lock will be written with precise versions, and vendor/ will be populated with the precise versions written to Gopkg.lock.
Report the status of the project's dependencies ¶
Usage:
status [package...]
With no arguments, print the status of each dependency of the project.
PROJECT Import path CONSTRAINT Version constraint, from the manifest VERSION Version chosen, from the lock REVISION VCS revision of the chosen version LATEST Latest VCS revision available PKGS USED Number of packages from this project that are actually used
With one or more explicitly specified packages, or with the -detailed flag, print an extended status output for each dependency of the project.
TODO Another column description FOOBAR Another column description
Status returns exit code zero if all dependencies are in a "good state".
Ensure a dependency is safely vendored in the project ¶
Usage:
ensure [-update | -add] [-no-vendor | -vendor-only] [-dry-run] [<spec>...]
Project spec:
<import path>[:alt source URL][@<constraint>]
Ensure gets a project into a complete, reproducible, and likely compilable state:
- All non-stdlib imports are fulfilled
- All rules in Gopkg.toml are respected
- Gopkg.lock records precise versions for all dependencies
- vendor/ is populated according to Gopkg.lock
Ensure has fast techniques to determine that some of these steps may be unnecessary. If that determination is made, ensure may skip some steps. Flags may be passed to bypass these checks; -vendor-only will allow an out-of-date Gopkg.lock to populate vendor/, and -no-vendor will update Gopkg.lock (if needed), but never touch vendor/.
The effect of passing project spec arguments varies slightly depending on the combination of flags that are passed.
Examples:
dep ensure Populate vendor from existing Gopkg.toml and Gopkg.lock dep ensure -add github.com/pkg/foo Introduce a named dependency at its newest version dep ensure -add github.com/pkg/foo@^1.0.1 Introduce a named dependency with a particular constraint
For more detailed usage examples, see dep ensure -examples.
Prune the vendor tree of unused packages ¶
Usage:
prune
Prune is used to remove unused packages from your vendor tree.
STABILITY NOTICE: this command creates problems for vendor/ verification. As such, it may be removed and/or moved out into a separate project later on.
Show the dep version information ¶
Usage:
version
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmalgomatedMain ¶
func AmalgomatedMain()
Types ¶
type BasicStatus ¶
type BasicStatus struct { ProjectRoot string Children []string Constraint gps.Constraint Version gps.UnpairedVersion Revision gps.Revision Latest gps.Version PackageCount int // contains filtered or unexported fields }
BasicStatus contains all the information reported about a single dependency in the summary/list status output mode.
type Config ¶
type Config struct { WorkingDir string // Where to execute Args []string // Command-line arguments, starting with the program name. Env []string // Environment variables Stdout, Stderr io.Writer // Log output }
A Config specifies a full configuration for a dep execution.
type DetailStatus ¶ added in v1.1.0
type DetailStatus struct { BasicStatus Packages []string Source string PruneOpts gps.PruneOptions Digest verify.VersionedDigest }
DetailStatus contains all information reported about a single dependency in the detailed status output mode. The included information matches the information included about a a project in a lock file.
type MissingStatus ¶
MissingStatus contains information about all the missing packages in a project.