blob: f5ccd13417ff943d23003c85e9ffdcc5994d17e5 [file] [log] [blame] [view]
Jason Buberel4944c9d2015-10-27 22:58:52 -07001This page contains a list of tools for managing Go packages and their dependencies (vendoring). The tools are divided into categories based on their approach to version management.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11002
Bo Zhang888961d2017-02-09 15:20:57 +08003To see popularity of these tools, click [here](https://github.com/blindpirate/report-of-build-tools-for-java-and-golang).
Bo Zhangaaf45472016-12-29 22:57:43 +08004
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +03005## dep tool
6
Florin Pățan610fc2c2017-02-08 23:38:12 +00007[dep](https://github.com/golang/dep), will be the *official* dependency tool. It is currently being implemented, in pre-alpha state and should be used with caution as "Lots of functionality is knowingly missing or broken".
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +03008
Jason Buberel044aea32015-08-17 08:12:05 -07009## GO15VENDOREXPERIMENT
10
Jason Buberelcbb22962015-08-24 07:57:43 -070011As of [June 19th, 2015](https://groups.google.com/d/msg/golang-dev/74zjMON9glU/EOKSoaL5p8wJ), the Go toolchain includes an experimental vendoring flag, `GO15VENDOREXPERIMENT`. This is now part of the Go 1.5 release and represents the Go team's recommended approach to vendoring dependencies. You can read more about how this environment variable works in the [Go 1.5 documentation](https://golang.org/cmd/go/#hdr-Vendor_Directories) and the [original design document](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo/view). For a more detailed explanation, check out [this post](https://medium.com/@freeformz/go-1-5-s-vendor-experiment-fd3e830f52c3) by [@freeformz](https://twitter.com/freeformz) or [this short explainer](http://engineeredweb.com/blog/2015/go-1.5-vendor-handling/) from Engineered Web.
Jason Buberel044aea32015-08-17 08:12:05 -070012
Jianfei Wang9b73aeb2016-11-06 13:06:35 +080013Go 1.6 release makes this behaviour the default, so you no longer need to have `GO15VENDOREXPERIMENT` set. Go 1.7 makes this a standard feature and removes support for this flag.
Ivan Mikushind9e83c42016-03-08 16:44:04 -080014
Jason Buberel66d32352015-08-23 08:35:14 -070015Tools supporting this feature include:
16
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +030017 * [dep](https://github.com/golang/dep)
Egor Kovetskiyea436cc2016-05-10 15:42:06 +060018 * [manul](https://github.com/kovetskiy/manul) - Vendor packages using git submodules.
Jason Buberel66d32352015-08-23 08:35:14 -070019 * [Godep](https://github.com/tools/godep)
20 * [Govendor](https://github.com/kardianos/govendor)
Jason Buberel66d32352015-08-23 08:35:14 -070021 * [godm](https://github.com/hectorj/godm)
22 * [vexp](https://github.com/kr/vexp)
Jesse Lucas6b640322015-08-23 15:24:06 -040023 * [gv](https://github.com/forestgiant/gv)
Daniel Theophanes3b58ac92015-09-18 08:34:03 -070024 * [gvt](https://github.com/FiloSottile/gvt) - Recursively retrieve and vendor packages.
Jack Spirou519f6d22016-12-29 19:54:56 -060025 * [govend](https://github.com/govend/govend) - Manage dependencies like `go get` but for `/vendor`.
Matt Farinab2429752016-07-29 08:21:21 -040026 * [Glide](https://github.com/Masterminds/glide) - Manage packages like composer, npm, bundler, or other languages.
David Wragga8aaccc2016-01-31 10:23:18 +000027 * [Vendetta](https://github.com/dpw/vendetta)
Ivan Mikushind9e83c42016-03-08 16:44:04 -080028 * [trash](https://github.com/rancher/trash)
toxeusebd8efc2016-03-10 00:09:15 +010029 * [gsv](https://github.com/toxeus/gsv)
mattn5fd1c922016-03-28 09:34:12 +090030 * [gom](https://github.com/mattn/gom)
Jason Buberel044aea32015-08-17 08:12:05 -070031
Jason Bubereld16be8a2015-08-23 13:19:27 -070032## Pkg copy, built using GOPATH modification, supports fetching specific version
Daniel Theophanes6626fb22015-05-02 06:40:58 -070033
Jason Bubereld16be8a2015-08-23 13:19:27 -070034Copy packages locally. When building modify the GOPATH or use the GO 1.5 `GO15VENDOREXPERIMENT` to reference the local package store. Not only records specific version, but also fetches specific version.
Daniel Theophanes6626fb22015-05-02 06:40:58 -070035
Bo Zhang8a57b0f2017-02-14 16:20:12 +080036| **gogradle** |https://github.com/blindpirate/gogradle|
37|:----------|:-----------------------------|
38|Title |A Full-featured Build Tool for Golang|
39|Author |Bo Zhang |
40|Categories |Project-scoped dependencies, Go version management, Vendoring, Version/Commit locking, Transitive dependency, Automatic build. Support All platforms |
41
Ivan Mikushind9e83c42016-03-08 16:44:04 -080042| **trash** |https://github.com/rancher/trash|
43|:----------|:-----------------------------|
44|Title |Minimalistic Go vendored code manager|
45|Author |Ivan Mikushin, Darren Shepherd |
46|Categories |Vendoring, Version/Commit locking, Pruning unimported code, Using package forks. Does not support Windows. |
47| | |
Matt Farinaa2dad972015-09-01 19:46:04 -040048| **glide** |https://github.com/Masterminds/glide|
49|Title |Lightweight Vendor Package Manager|
50|Author |Matt Butcher and Matt Farina |
51|Categories |Retrieve and manage packages in your `vendor/` directory using the `GO15VENDOREXPERIMENT`. |
52| | |
Unknwon347a24f2016-02-13 14:36:05 -050053| **gopm** |https://github.com/gpmgo/gopm |
54|Title |Package manage and build tool in Go|
55|Author |Jiahua Chen |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070056|Categories |Revision Locking (git, mercurial, bazaar). Copies into ".vendor/src".|
57| | |
58| **gom** |https://github.com/mattn/gom |
59|Title |Go Manager - bundle for go |
60|Author |Yasuhiro Matsumoto |
61|Categories |Vendoring/Bundling. Copies into "_vendor/src" |
62| | |
63| **bunch** |https://github.com/dkulchenko/bunch|
64|Title |npm-like tool for managing Go dependencies|
65|Author |Daniil Kulchenko |
66|Categories |Vendoring/Bundling/Revision Locking. Copies into ".vendor". Does NOT fully support windows.|
67| | |
68| **goop** |https://github.com/nitrous-io/goop|
69|Title |A dependency manager for Go (golang), inspired by Bundler.|
70|Author |Nitrous.IO |
71|Categories |Vendoring, Revision Locking. Copies into ".vendor/src". Does NOT fully support windows. |
Jack Spiroudf7580b2015-09-10 14:42:40 -050072| |
Jack Spiroue3859682016-02-16 14:56:09 -060073| **govend** |https://github.com/govend/govend |
Jack Spirou685f0de2016-03-06 00:19:16 -060074|Title |A simple tool to vendor Go package dependencies. It's like `go get` for vendoring. |
Jack Spirou509a99d2015-09-10 14:43:48 -050075|Author |Jack Spirou |
Jack Spirouf8a23ad2016-03-06 00:19:46 -060076|Categories | Vendor and lock revisions of packages recursively into the "vendor" directory with `go get` commands/flags. Supports Go 1.5+ and Windows. Does not alter `$GOPATH` and works with normal `go` commands/tooling. |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070077
78## Pkg copy, build using GOPATH modification
Jason Bubereld16be8a2015-08-23 13:19:27 -070079
Daniel Theophanes6626fb22015-05-02 06:40:58 -070080Copy packages locally. When building modify the GOPATH to reference the local package store.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110081
John Asmuthae6c16a2015-05-01 14:35:23 -040082| **godep** |https://github.com/tools/godep|
Daniel Theophanes1376c402015-05-01 12:01:03 -070083|:----------|:-----------------------------|
John Asmuthae6c16a2015-05-01 14:35:23 -040084|Title |Helps build packages reproducibly by fixing their dependencies|
85|Author |Keith Rarick |
Daniel Theophanes19437fc2015-05-06 21:18:43 -070086|Categories |Vendoring, Version Recording. Copies into "Godep/_workspace/src".|
John Asmuthae6c16a2015-05-01 14:35:23 -040087| | |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070088| **wgo** |https://github.com/skelterjohn/wgo|
89|Title |Managed workspaces on top of the go tool|
90|Author |John Asmuth |
91|Categories |local GOPATH can be configured.|
Jason Buberela6db58e2015-07-11 16:21:03 -070092| | |
Jason Buberela6db58e2015-07-11 16:21:03 -070093| **gb** |http://getgb.io/|
94|Title |Project-based workspaces and dependency management|
95|Author |Dave Cheney |
96|Categories |Project-based workspaces, vendoring, version locking. Manages dependencies in /vendor/src|
7ransf5daefd2016-05-02 22:24:11 -040097| | |
98| **goat** |https://github.com/mediocregopher/goat |
99|Title |Simple go dependency manager |
100|Author |Brian Picciano |
101|Categories |Project-based workspaces and vendoring |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100102
103## Revision Locking
Jason Bubereld16be8a2015-08-23 13:19:27 -0700104
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700105Package source control versions are recorded. Versions are updated into the GOPATH package tree.
106Requires switching GOPATH for every project.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100107
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100108| **glock** |https://github.com/robfig/glock|
Jason Buberela6db58e2015-07-11 16:21:03 -0700109|:-----------|:-----------------------------|
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100110|Title |Lock dependencies to specific revisions.|
111|Author |Rob Figueiredo |
Rick Beton858acad2016-05-20 18:57:28 +0100112|Categories |Revision Locking (git, mercurial, bzr, svn) |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100113| | |
114| **gobs** |https://bitbucket.org/vegansk/gobs|
115|Title |Build system and package manager for go language|
116|Author |Anatoly Galiulin |
Daniel Theophanes0af40002015-05-02 07:07:28 -0700117|Categories |Revision Locking (git). Requires bash, no Windows support. |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100118| | |
Spencer Nelsond4c43802017-01-27 15:44:46 -0500119| **godeps** |https://github.com/rogpeppe/godeps |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100120|Title |Print, fetch and update dependencies with care. In production use by Canonical. The first tool with this name!|
121|Author |Roger Peppe |
122|Categories | Revision Locking (git, mercurial, bzr)|
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700123| | |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100124| **gopack** |https://github.com/d2fn/gopack|
125|Title |Dependency management for go inspired by rebar|
126|Author |Dietrich Featherston |
127|Categories |Revision Locking (git) |
128| | |
129| **gopin** |https://github.com/laher/gopin|
130|Title |Experimental go-get fork with support for tags and alternative repos|
131|Author |Go Package Manager |
132|Categories |Revision Locking (git) |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700133| | |
134| **gigo** |https://github.com/LyricalSecurity/gigo|
135|Title |Helps provide go get support for private repositories, pip for golang|
136|Author |Lyrical Security |
137|Categories |Vendoring, Revision Locking (git). Does not appear to copy files. |
138
Jason Bubereld16be8a2015-08-23 13:19:27 -0700139## Pkg copy with import path re-write (As of Go 1.5, this is no longer the recommended practice)
140
141Vendoring with import path rewriting takes the 3rd party source code that is referenced in your project and makes a copy of that code inside a new folder within the project. It re-writes the import paths so there is a single copy of all packages. GOPATH is not modified at any time.
142
143| **party** |https://github.com/mjibson/party|
144|:----------|:-----------------------------|
145|Author |Matt Jibson |
146|Categories |Vendoring, Copies into "_third_party". Does not analyze dependencies first. No inspection.|
147| | |
148| **govendor** |https://github.com/kardianos/govendor|
149|Title |Copy, re-write, and list dependent package status.|
150|Author |Daniel Theophanes |
151|Categories |Pkg Copy,Import rewrite, record VCS version. Copies into "internal" or "vendor". |
152| | |
153| **vendorize** |https://github.com/kisielk/vendorize|
154|Author |Kamil Kisiel |
155|Categories |Vendoring. Copies into "3rdparty". |
156| | |
157| **nut** |https://github.com/jingweno/nut|
158|Author |Jingwen Owen Ou |
159|Categories |Pkg Copy & Import rewrite. Copies into "vendor". |
160
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700161
162## Vendor Utilities
163Not full vendor tool, but may still provide value.
164
165| **prewrite** |https://github.com/dmitris/prewrite|
166|:-----------|:-----------------------------|
167|Author |Dmitry Savintsev |
168|Categories |Import re-writer, add or remove specified prefix |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100169
Yandry Pozo65d50f42016-04-26 15:27:02 -0600170| **git freeze** |https://github.com/nicerobot/git-freeze|
171|:-----------|:-----------------------------|
172|Author |Robert Nix (nicerobot) |
173|Categories |Easy Go vendoring via git submodule |
174
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100175## Import Proxies
176Import Proxies act as a man in the middle between the Go tool and the VCS. It parses the data stream while the repository is being cloned.
177
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100178| **gopkg.in** |https://gopkg.in |
James Whitedd414852015-09-22 15:07:19 +0100179|:----------------------|:--------------------------------------------|
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100180|Title |Redirect the go tool onto well defined GitHub repositories. Versioning with tags and branches or the repository name.|
181|Author |Gustavo Niemeyer |
182|Categories |Import Proxy (GitHub) |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100183
184## Go Version Managers
185Go Version Managers allow you to have multiple versions of Go installed on your machine. It allows you to switch between those versions.
186
toromotif5db6ae2015-01-17 13:59:25 +0900187| **goenv** | https://bitbucket.org/ymotongpoo/goenv |
188|:-----------|:---------------------------------------|
189| Title | Go environment manager |
190| Author | Yoshifumi YAMAGUCHI |
191| Categories | Go Version Manager |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100192
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100193
194## Client App Test Packages
195Here is a list of packages that authors can use to test their tools against.
196
197| **beego-mgo** |https://github.com/goinggo/beego-mgo|
198|:--------------|:-----------------------------------|
199|Author |Bill Kennedy |
200|Desc |Sample Application For Using the Beego web framework with MGO|
201| | |
202| **revel-mgo** |https://github.com/goinggo/revel-mgo|
203|Author |Bill Kennedy |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700204|Desc |Sample revel project with mgo support|
205
206## Abandoned Tools
207 * https://github.com/coreos/third_party.go
208 * http://godoc.org/kylelemons.net/go/rx
209 * https://github.com/theplant/pak
James Whitedd414852015-09-22 15:07:19 +0100210 * https://github.com/msiebuhr/git-version-proxy
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700211
212## Not Written in Go
213These tools are recorded for completeness, but it is suggested not to use them as they are platform specific.
214 * https://github.com/rosylilly/gondler
215 * https://github.com/VividCortex/johnny-deps
216 * https://github.com/moovweb/gvm
Christian Sturm0924b2b2017-01-07 19:32:24 +0100217 * https://github.com/pote/gpm
218 * https://github.com/brettlangdon/git-vendor