blob: 11f0817f96390fd010758d7cbba1f2b938786a28 [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
Bryan C. Millsefe215a2018-07-16 15:51:38 -04005## GO111MODULE
Alexey Palazhchenkob35fb172018-07-26 17:45:00 +03006
Bryan C. Millsefe215a2018-07-16 15:51:38 -04007See the [[Modules]] page.
8
Musin Vitaly52de0292018-06-06 12:17:03 +05009The official Go proposal is at https://golang.org/issue/24301, filed on March 20, 2018 and accepted on May 21, 2018.
10
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +030011## dep tool
12
Alexey Palazhchenkob35fb172018-07-26 17:45:00 +030013[dep](https://github.com/golang/dep) was the "official experiment." The Go toolchain, as of 1.11, has (experimentally) adopted an approach that sharply diverges from dep. See [[Modules]].
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +030014
Jason Buberel044aea32015-08-17 08:12:05 -070015## GO15VENDOREXPERIMENT
16
Jonathan Hall9bc20192017-03-20 12:52:51 +010017As of [June 19th, 2015](https://groups.google.com/d/msg/golang-dev/74zjMON9glU/EOKSoaL5p8wJ), the Go toolchain included an experimental vendoring flag, `GO15VENDOREXPERIMENT`. This was part of the Go 1.5 release and represented the Go team's recommended approach to vendoring dependencies. You can read more about how this environment variable worked 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 -070018
Weston Carlson40ea5cd2017-03-23 21:46:17 -060019The Go 1.6 release made this behaviour the default, so you no longer need to have `GO15VENDOREXPERIMENT` set. Go 1.7 made this a standard feature and removed support for the flag.
Ivan Mikushind9e83c42016-03-08 16:44:04 -080020
Jason Buberel66d32352015-08-23 08:35:14 -070021Tools supporting this feature include:
22
Alexey Palazhchenko78ce3e42017-01-25 18:39:25 +030023 * [dep](https://github.com/golang/dep)
Egor Kovetskiyea436cc2016-05-10 15:42:06 +060024 * [manul](https://github.com/kovetskiy/manul) - Vendor packages using git submodules.
Jason Buberel66d32352015-08-23 08:35:14 -070025 * [Godep](https://github.com/tools/godep)
26 * [Govendor](https://github.com/kardianos/govendor)
Jason Buberel66d32352015-08-23 08:35:14 -070027 * [godm](https://github.com/hectorj/godm)
28 * [vexp](https://github.com/kr/vexp)
Jesse Lucas6b640322015-08-23 15:24:06 -040029 * [gv](https://github.com/forestgiant/gv)
Daniel Theophanes3b58ac92015-09-18 08:34:03 -070030 * [gvt](https://github.com/FiloSottile/gvt) - Recursively retrieve and vendor packages.
Jack Spirou519f6d22016-12-29 19:54:56 -060031 * [govend](https://github.com/govend/govend) - Manage dependencies like `go get` but for `/vendor`.
Matt Farinab2429752016-07-29 08:21:21 -040032 * [Glide](https://github.com/Masterminds/glide) - Manage packages like composer, npm, bundler, or other languages.
David Wragga8aaccc2016-01-31 10:23:18 +000033 * [Vendetta](https://github.com/dpw/vendetta)
Ivan Mikushind9e83c42016-03-08 16:44:04 -080034 * [trash](https://github.com/rancher/trash)
toxeusebd8efc2016-03-10 00:09:15 +010035 * [gsv](https://github.com/toxeus/gsv)
mattn5fd1c922016-03-28 09:34:12 +090036 * [gom](https://github.com/mattn/gom)
Navid9f7b78c2017-04-18 07:01:23 +043037 * [Rubigo](https://github.com/yaa110/rubigo) - Golang vendor utility and package manager
Jason Buberel044aea32015-08-17 08:12:05 -070038
Jason Bubereld16be8a2015-08-23 13:19:27 -070039## Pkg copy, built using GOPATH modification, supports fetching specific version
Daniel Theophanes6626fb22015-05-02 06:40:58 -070040
Jason Bubereld16be8a2015-08-23 13:19:27 -070041Copy 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 -070042
xichy.dongde6989e2017-03-16 17:52:26 +080043| **gogradle** |https://github.com/blindpirate/gogradle |
Bo Zhang8a57b0f2017-02-14 16:20:12 +080044|:----------|:-----------------------------|
45|Title |A Full-featured Build Tool for Golang|
46|Author |Bo Zhang |
47|Categories |Project-scoped dependencies, Go version management, Vendoring, Version/Commit locking, Transitive dependency, Automatic build. Support All platforms |
48
xichy.dongde6989e2017-03-16 17:52:26 +080049| **trash** |https://github.com/rancher/trash |
Ivan Mikushind9e83c42016-03-08 16:44:04 -080050|:----------|:-----------------------------|
51|Title |Minimalistic Go vendored code manager|
52|Author |Ivan Mikushin, Darren Shepherd |
53|Categories |Vendoring, Version/Commit locking, Pruning unimported code, Using package forks. Does not support Windows. |
54| | |
xichy.dongde6989e2017-03-16 17:52:26 +080055| **glide** |https://github.com/Masterminds/glide |
Matt Farinaa2dad972015-09-01 19:46:04 -040056|Title |Lightweight Vendor Package Manager|
57|Author |Matt Butcher and Matt Farina |
58|Categories |Retrieve and manage packages in your `vendor/` directory using the `GO15VENDOREXPERIMENT`. |
59| | |
Unknwon347a24f2016-02-13 14:36:05 -050060| **gopm** |https://github.com/gpmgo/gopm |
61|Title |Package manage and build tool in Go|
62|Author |Jiahua Chen |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070063|Categories |Revision Locking (git, mercurial, bazaar). Copies into ".vendor/src".|
64| | |
65| **gom** |https://github.com/mattn/gom |
66|Title |Go Manager - bundle for go |
67|Author |Yasuhiro Matsumoto |
68|Categories |Vendoring/Bundling. Copies into "_vendor/src" |
69| | |
xichy.dongde6989e2017-03-16 17:52:26 +080070| **bunch** |https://github.com/dkulchenko/bunch |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070071|Title |npm-like tool for managing Go dependencies|
72|Author |Daniil Kulchenko |
73|Categories |Vendoring/Bundling/Revision Locking. Copies into ".vendor". Does NOT fully support windows.|
74| | |
xichy.dongde6989e2017-03-16 17:52:26 +080075| **goop** |https://github.com/nitrous-io/goop |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070076|Title |A dependency manager for Go (golang), inspired by Bundler.|
77|Author |Nitrous.IO |
78|Categories |Vendoring, Revision Locking. Copies into ".vendor/src". Does NOT fully support windows. |
Jack Spiroudf7580b2015-09-10 14:42:40 -050079| |
Jack Spiroue3859682016-02-16 14:56:09 -060080| **govend** |https://github.com/govend/govend |
Jack Spirou685f0de2016-03-06 00:19:16 -060081|Title |A simple tool to vendor Go package dependencies. It's like `go get` for vendoring. |
Jack Spirou509a99d2015-09-10 14:43:48 -050082|Author |Jack Spirou |
Jack Spirouf8a23ad2016-03-06 00:19:46 -060083|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 -070084
85## Pkg copy, build using GOPATH modification
Jason Bubereld16be8a2015-08-23 13:19:27 -070086
Daniel Theophanes6626fb22015-05-02 06:40:58 -070087Copy packages locally. When building modify the GOPATH to reference the local package store.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110088
xichy.dong56716102017-03-16 17:55:59 +080089| **godep** |https://github.com/tools/godep |
Daniel Theophanes1376c402015-05-01 12:01:03 -070090|:----------|:-----------------------------|
John Asmuthae6c16a2015-05-01 14:35:23 -040091|Title |Helps build packages reproducibly by fixing their dependencies|
92|Author |Keith Rarick |
Daniel Theophanes19437fc2015-05-06 21:18:43 -070093|Categories |Vendoring, Version Recording. Copies into "Godep/_workspace/src".|
John Asmuthae6c16a2015-05-01 14:35:23 -040094| | |
xichy.dong56716102017-03-16 17:55:59 +080095| **wgo** |https://github.com/skelterjohn/wgo |
Daniel Theophanes6626fb22015-05-02 06:40:58 -070096|Title |Managed workspaces on top of the go tool|
97|Author |John Asmuth |
98|Categories |local GOPATH can be configured.|
Jason Buberela6db58e2015-07-11 16:21:03 -070099| | |
xichy.dong56716102017-03-16 17:55:59 +0800100| **gb** |http://getgb.io/ |
Jason Buberela6db58e2015-07-11 16:21:03 -0700101|Title |Project-based workspaces and dependency management|
102|Author |Dave Cheney |
103|Categories |Project-based workspaces, vendoring, version locking. Manages dependencies in /vendor/src|
7ransf5daefd2016-05-02 22:24:11 -0400104| | |
105| **goat** |https://github.com/mediocregopher/goat |
106|Title |Simple go dependency manager |
107|Author |Brian Picciano |
108|Categories |Project-based workspaces and vendoring |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100109
110## Revision Locking
Jason Bubereld16be8a2015-08-23 13:19:27 -0700111
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700112Package source control versions are recorded. Versions are updated into the GOPATH package tree.
113Requires switching GOPATH for every project.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100114
xichy.dong56716102017-03-16 17:55:59 +0800115| **glock** |https://github.com/robfig/glock |
Jason Buberela6db58e2015-07-11 16:21:03 -0700116|:-----------|:-----------------------------|
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100117|Title |Lock dependencies to specific revisions.|
118|Author |Rob Figueiredo |
Rick Beton858acad2016-05-20 18:57:28 +0100119|Categories |Revision Locking (git, mercurial, bzr, svn) |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100120| | |
xichy.dong56716102017-03-16 17:55:59 +0800121| **gobs** |https://bitbucket.org/vegansk/gobs |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100122|Title |Build system and package manager for go language|
123|Author |Anatoly Galiulin |
Daniel Theophanes0af40002015-05-02 07:07:28 -0700124|Categories |Revision Locking (git). Requires bash, no Windows support. |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100125| | |
Spencer Nelsond4c43802017-01-27 15:44:46 -0500126| **godeps** |https://github.com/rogpeppe/godeps |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100127|Title |Print, fetch and update dependencies with care. In production use by Canonical. The first tool with this name!|
128|Author |Roger Peppe |
129|Categories | Revision Locking (git, mercurial, bzr)|
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700130| | |
xichy.dong56716102017-03-16 17:55:59 +0800131| **gopack** |https://github.com/d2fn/gopack |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100132|Title |Dependency management for go inspired by rebar|
133|Author |Dietrich Featherston |
134|Categories |Revision Locking (git) |
135| | |
xichy.dong56716102017-03-16 17:55:59 +0800136| **gopin** |https://github.com/laher/gopin |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100137|Title |Experimental go-get fork with support for tags and alternative repos|
138|Author |Go Package Manager |
139|Categories |Revision Locking (git) |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700140| | |
xichy.dong56716102017-03-16 17:55:59 +0800141| **gigo** |https://github.com/LyricalSecurity/gigo |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700142|Title |Helps provide go get support for private repositories, pip for golang|
143|Author |Lyrical Security |
144|Categories |Vendoring, Revision Locking (git). Does not appear to copy files. |
Scott Blum28c618e2017-07-06 19:54:09 -0400145| | |
146| **gorepoman** |https://github.com/fullstorydev/gorepoman |
147|Title |Super powered `go get` for managing revisions in a monorepo |
148|Author |FullStory |
149|Categories |Revision Locking (git). Does not alter `$GOPATH` and works with normal `go` commands/tooling. IDE friendly. Easy to reconcile local changes, submit changes upstream. |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700150
Jason Bubereld16be8a2015-08-23 13:19:27 -0700151## Pkg copy with import path re-write (As of Go 1.5, this is no longer the recommended practice)
152
153Vendoring 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.
154
xichy.dong56716102017-03-16 17:55:59 +0800155| **party** |https://github.com/mjibson/party |
Jason Bubereld16be8a2015-08-23 13:19:27 -0700156|:----------|:-----------------------------|
157|Author |Matt Jibson |
158|Categories |Vendoring, Copies into "_third_party". Does not analyze dependencies first. No inspection.|
159| | |
xichy.dong56716102017-03-16 17:55:59 +0800160| **govendor** |https://github.com/kardianos/govendor |
Jason Bubereld16be8a2015-08-23 13:19:27 -0700161|Title |Copy, re-write, and list dependent package status.|
162|Author |Daniel Theophanes |
163|Categories |Pkg Copy,Import rewrite, record VCS version. Copies into "internal" or "vendor". |
164| | |
xichy.dong56716102017-03-16 17:55:59 +0800165| **vendorize** |https://github.com/kisielk/vendorize |
Jason Bubereld16be8a2015-08-23 13:19:27 -0700166|Author |Kamil Kisiel |
167|Categories |Vendoring. Copies into "3rdparty". |
168| | |
xichy.dong56716102017-03-16 17:55:59 +0800169| **nut** |https://github.com/jingweno/nut |
Jason Bubereld16be8a2015-08-23 13:19:27 -0700170|Author |Jingwen Owen Ou |
171|Categories |Pkg Copy & Import rewrite. Copies into "vendor". |
172
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700173
174## Vendor Utilities
175Not full vendor tool, but may still provide value.
176
xichy.dong56716102017-03-16 17:55:59 +0800177| **prewrite** |https://github.com/dmitris/prewrite |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700178|:-----------|:-----------------------------|
179|Author |Dmitry Savintsev |
180|Categories |Import re-writer, add or remove specified prefix |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100181
xichy.dong56716102017-03-16 17:55:59 +0800182| **git freeze** |https://github.com/nicerobot/git-freeze |
Yandry Pozo65d50f42016-04-26 15:27:02 -0600183|:-----------|:-----------------------------|
184|Author |Robert Nix (nicerobot) |
185|Categories |Easy Go vendoring via git submodule |
186
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100187## Import Proxies
188Import 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.
189
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100190| **gopkg.in** |https://gopkg.in |
James Whitedd414852015-09-22 15:07:19 +0100191|:----------------------|:--------------------------------------------|
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100192|Title |Redirect the go tool onto well defined GitHub repositories. Versioning with tags and branches or the repository name.|
193|Author |Gustavo Niemeyer |
194|Categories |Import Proxy (GitHub) |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100195
196## Go Version Managers
197Go Version Managers allow you to have multiple versions of Go installed on your machine. It allows you to switch between those versions.
198
toromotif5db6ae2015-01-17 13:59:25 +0900199| **goenv** | https://bitbucket.org/ymotongpoo/goenv |
200|:-----------|:---------------------------------------|
201| Title | Go environment manager |
202| Author | Yoshifumi YAMAGUCHI |
203| Categories | Go Version Manager |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100204
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100205
206## Client App Test Packages
207Here is a list of packages that authors can use to test their tools against.
208
xichy.dong56716102017-03-16 17:55:59 +0800209| **beego-mgo** |https://github.com/goinggo/beego-mgo |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100210|:--------------|:-----------------------------------|
211|Author |Bill Kennedy |
212|Desc |Sample Application For Using the Beego web framework with MGO|
213| | |
xichy.dong2fd0ca72017-03-16 17:56:25 +0800214| **revel-mgo** |https://github.com/goinggo/revel-mgo |
Andrew Gerrand5bc444d2014-12-10 11:35:11 +1100215|Author |Bill Kennedy |
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700216|Desc |Sample revel project with mgo support|
217
218## Abandoned Tools
219 * https://github.com/coreos/third_party.go
220 * http://godoc.org/kylelemons.net/go/rx
221 * https://github.com/theplant/pak
James Whitedd414852015-09-22 15:07:19 +0100222 * https://github.com/msiebuhr/git-version-proxy
Daniel Theophanes6626fb22015-05-02 06:40:58 -0700223
224## Not Written in Go
225These tools are recorded for completeness, but it is suggested not to use them as they are platform specific.
226 * https://github.com/rosylilly/gondler
227 * https://github.com/VividCortex/johnny-deps
228 * https://github.com/moovweb/gvm
Christian Sturm0924b2b2017-01-07 19:32:24 +0100229 * https://github.com/pote/gpm
Navid5f2bfc52017-04-18 06:57:11 +0430230 * https://github.com/brettlangdon/git-vendor
Navidb42eeac2017-04-21 18:11:11 +0430231 * https://github.com/yaa110/rubigo - written in Rust