Dep is a prototype dependency management tool. It requires Go 1.7 or newer to compile.
dep
is NOT an official tool. Yet. Check out the Roadmap!
dep
is safe for production use. That means two things:
- Any valid metadata file (
Gopkg.toml
andGopkg.lock
) will be readable and considered valid by any future version ofdep
. - Generally speaking, it has comparable or fewer bugs than other tools out there.
That said, keep in mind the following:
dep
is still changing rapidly. If you need stability (e.g. for CI), it's best to rely on a released version, not tip.- Some changes are pending to the CLI interface. Scripting on dep before they land is unwise.
dep
's exported API interface will continue to change in unpredictable, backwards-incompatible ways until we tag a v1.0.0 release.
- The Saga of Go Dependency Management
- Official Google Docs
- Frequently Asked Questions
Get the tool via
$ go get -u github.com/golang/dep/cmd/dep
To start managing dependencies using dep, run the following from your project root directory:
$ dep init
$ dep ensure -update
dep init
will do the following:
- Look for existing dependency management files to convert
- Back up your existing
vendor/
directory to_vendor-TIMESTAMP/
- Generate
Gopkg.toml
andGopkg.lock
files
When you or a collaborator add/remove/change dependencies by modifying
your import
s or Gopkg.toml
, run
$ dep ensure
This will synchronize your dependencies in vendor/
to make sure they match
what's in your import
s and Gopkg.toml
. dep ensure
is safe to run early and
often. See the help text for more detailed usage instructions.
$ dep help ensure
Feedback is greatly appreciated. At this stage, the maintainers are most interested in feedback centered on the user experience (UX) of the tool. Do you have workflows that the tool supports well, or doesn't support at all? Do any of the commands have surprising effects, output, or results? Please check the existing issues and FAQ to see if your feedback has already been reported. If not, please file an issue, describing what you did or wanted to do, what you expected to happen, and what actually happened.
Contributions are greatly appreciated. The maintainers actively manage the issues list, and try to highlight issues suitable for newcomers. The project follows the typical GitHub pull request model. See CONTRIBUTING.md for more details. Before starting any work, please either comment on an existing issue, or file a new one.