go mod
Go Modules have recently been released and announced as the official Go dependency management tool. A lot of Go 3rd libraries are being migrated to use Go Modules and require dependent projects to use Go Modules as well. Therefore, Go Dep is going to be deprecated soon. We will swap Dep for Go Modules in the project we previously started
Features
- Allow and recommend projects to be located outside of
$GOPATH. - Dependencies are put into a
vendordirectory (same asgo-dep), so that different projects can depend on different versions of the same packages. - Automatically detect import statements and then update dependencies graph, lock, download, and install appropriate versions of packages.
- Automatically check for dependencies when
build,run, ortest. - Allow specifying, downgrading, and upgrading versions of packages.
- Automatically generate a dependency lock to ensure reproducible builds.
- Semantic versioning mechanism.
- The official recommendation for dependencies and applied in the Go ecosystem.