dep README

The project's README from github.com/golang/dep. As one markdown file: README.md.

Build Status Windows Build Status

Dep

dep is a dependency management tool for Go. It requires Go 1.9 or newer to compile.

NOTE: Dep was an official experiment to implement a package manager for Go. As of 2020, Dep is deprecated and archived in favor of Go modules, which have had official support since Go 1.11. For more details, see https://golang.org/ref/mod.

For guides and reference materials about dep, see the documentation.

Installation

You should use an officially released version. Release binaries are available on the releases page.

On MacOS you can install or upgrade to the latest released version with Homebrew:

$ brew install dep
$ brew upgrade dep

On Debian platforms you can install or upgrade to the latest version with apt-get:

$ sudo apt-get install go-dep

On Windows, you can download a tarball from go.equinox.io.

On other platforms you can use the install.sh script:

$ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

It will install into your $GOPATH/bin directory by default or any other directory you specify using the INSTALL_DIRECTORY environment variable.

If your platform is not supported, you'll need to build it manually or let the team know and we'll consider adding your platform to the release builds.

If you're interested in getting the source code, or hacking on dep, you can install via go get:

go get -u github.com/golang/dep/cmd/dep

dep (golang/dep)

Searching Database…

12.7K ·GitHub
archived
这是什么?Dep 是 Go 官方推出的一款实验性依赖管理工具,用于为 Go 项目获取并锁定第三方包的版本。
它是库还是命令行工具?它是一款命令行工具,你在 Go 项目中运行它来管理依赖,而不是可以在代码中导入的库。
构建它需要特定的 Go 版本吗?需要。从源码构建需要 Go 1.9 或更高版本。
我现在应该在新项目中使用它吗?不应该。该项目已被弃用并归档,转而推荐使用 Go modules;Go modules 自 Go 1.11 起获得官方支持,因此不建议用于新项目。
支持哪些平台?提供 macOS、Debian/Linux 和 Windows 的发行版二进制文件;其他平台需要手动构建,或提出支持请求。
为什么 dep 被弃用了?Dep 是在 Go 自带依赖管理功能出现之前,为构建官方 Go 包管理器而进行的一次尝试。自 Go 1.11 起 Go modules 获得官方支持后,dep 就变得多余,项目随之被归档。
现在应该用什么来替代 dep?推荐用 Go modules 替代 dep。Go modules 是 Go 内置的依赖管理系统,自 Go 1.11 起获得支持。
Creator
golang
Size
12.2 MB
Stars
12.7K
Age
10y
Commits · 90 Days