tldr/pages/common/dep.md

25 lines
484 B
Markdown
Raw Normal View History

2017-12-13 16:18:16 +00:00
# dep
> Tool for dependency management in Go projects.
2019-06-08 01:04:00 +01:00
> More information: <https://golang.github.io/dep>.
2017-12-13 16:18:16 +00:00
- Initialize the current directory as the root of a Go project:
`dep init`
- Install any missing dependencies (Scans Gopkg.toml and your .go files):
`dep ensure`
- Report the status of the project's dependencies:
`dep status`
- Add a dependency to the project:
`dep ensure -add {{package_url}}`
- Update the locked versions of all dependencies:
`dep ensure -update`