Jason Buberel | 4944c9d | 2015-10-27 22:58:52 -0700 | [diff] [blame] | 1 | This 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 Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 2 | |
Bo Zhang | 888961d | 2017-02-09 15:20:57 +0800 | [diff] [blame] | 3 | To see popularity of these tools, click [here](https://github.com/blindpirate/report-of-build-tools-for-java-and-golang). |
Bo Zhang | aaf4547 | 2016-12-29 22:57:43 +0800 | [diff] [blame] | 4 | |
Alexey Palazhchenko | 78ce3e4 | 2017-01-25 18:39:25 +0300 | [diff] [blame] | 5 | ## dep tool |
| 6 | |
Florin Pățan | 610fc2c | 2017-02-08 23:38:12 +0000 | [diff] [blame] | 7 | [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 Palazhchenko | 78ce3e4 | 2017-01-25 18:39:25 +0300 | [diff] [blame] | 8 | |
Jason Buberel | 044aea3 | 2015-08-17 08:12:05 -0700 | [diff] [blame] | 9 | ## GO15VENDOREXPERIMENT |
| 10 | |
Jason Buberel | cbb2296 | 2015-08-24 07:57:43 -0700 | [diff] [blame] | 11 | As 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 Buberel | 044aea3 | 2015-08-17 08:12:05 -0700 | [diff] [blame] | 12 | |
Jianfei Wang | 9b73aeb | 2016-11-06 13:06:35 +0800 | [diff] [blame] | 13 | Go 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 Mikushin | d9e83c4 | 2016-03-08 16:44:04 -0800 | [diff] [blame] | 14 | |
Jason Buberel | 66d3235 | 2015-08-23 08:35:14 -0700 | [diff] [blame] | 15 | Tools supporting this feature include: |
| 16 | |
Alexey Palazhchenko | 78ce3e4 | 2017-01-25 18:39:25 +0300 | [diff] [blame] | 17 | * [dep](https://github.com/golang/dep) |
Egor Kovetskiy | ea436cc | 2016-05-10 15:42:06 +0600 | [diff] [blame] | 18 | * [manul](https://github.com/kovetskiy/manul) - Vendor packages using git submodules. |
Jason Buberel | 66d3235 | 2015-08-23 08:35:14 -0700 | [diff] [blame] | 19 | * [Godep](https://github.com/tools/godep) |
| 20 | * [Govendor](https://github.com/kardianos/govendor) |
Jason Buberel | 66d3235 | 2015-08-23 08:35:14 -0700 | [diff] [blame] | 21 | * [godm](https://github.com/hectorj/godm) |
| 22 | * [vexp](https://github.com/kr/vexp) |
Jesse Lucas | 6b64032 | 2015-08-23 15:24:06 -0400 | [diff] [blame] | 23 | * [gv](https://github.com/forestgiant/gv) |
Daniel Theophanes | 3b58ac9 | 2015-09-18 08:34:03 -0700 | [diff] [blame] | 24 | * [gvt](https://github.com/FiloSottile/gvt) - Recursively retrieve and vendor packages. |
Jack Spirou | 519f6d2 | 2016-12-29 19:54:56 -0600 | [diff] [blame] | 25 | * [govend](https://github.com/govend/govend) - Manage dependencies like `go get` but for `/vendor`. |
Matt Farina | b242975 | 2016-07-29 08:21:21 -0400 | [diff] [blame] | 26 | * [Glide](https://github.com/Masterminds/glide) - Manage packages like composer, npm, bundler, or other languages. |
David Wragg | a8aaccc | 2016-01-31 10:23:18 +0000 | [diff] [blame] | 27 | * [Vendetta](https://github.com/dpw/vendetta) |
Ivan Mikushin | d9e83c4 | 2016-03-08 16:44:04 -0800 | [diff] [blame] | 28 | * [trash](https://github.com/rancher/trash) |
toxeus | ebd8efc | 2016-03-10 00:09:15 +0100 | [diff] [blame] | 29 | * [gsv](https://github.com/toxeus/gsv) |
mattn | 5fd1c92 | 2016-03-28 09:34:12 +0900 | [diff] [blame] | 30 | * [gom](https://github.com/mattn/gom) |
Jason Buberel | 044aea3 | 2015-08-17 08:12:05 -0700 | [diff] [blame] | 31 | |
Jason Buberel | d16be8a | 2015-08-23 13:19:27 -0700 | [diff] [blame] | 32 | ## Pkg copy, built using GOPATH modification, supports fetching specific version |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 33 | |
Jason Buberel | d16be8a | 2015-08-23 13:19:27 -0700 | [diff] [blame] | 34 | Copy 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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 35 | |
Bo Zhang | 8a57b0f | 2017-02-14 16:20:12 +0800 | [diff] [blame] | 36 | | **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 Mikushin | d9e83c4 | 2016-03-08 16:44:04 -0800 | [diff] [blame] | 42 | | **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 Farina | a2dad97 | 2015-09-01 19:46:04 -0400 | [diff] [blame] | 48 | | **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 | | | | |
Unknwon | 347a24f | 2016-02-13 14:36:05 -0500 | [diff] [blame] | 53 | | **gopm** |https://github.com/gpmgo/gopm | |
| 54 | |Title |Package manage and build tool in Go| |
| 55 | |Author |Jiahua Chen | |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 56 | |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 Spirou | df7580b | 2015-09-10 14:42:40 -0500 | [diff] [blame] | 72 | | | |
Jack Spirou | e385968 | 2016-02-16 14:56:09 -0600 | [diff] [blame] | 73 | | **govend** |https://github.com/govend/govend | |
Jack Spirou | 685f0de | 2016-03-06 00:19:16 -0600 | [diff] [blame] | 74 | |Title |A simple tool to vendor Go package dependencies. It's like `go get` for vendoring. | |
Jack Spirou | 509a99d | 2015-09-10 14:43:48 -0500 | [diff] [blame] | 75 | |Author |Jack Spirou | |
Jack Spirou | f8a23ad | 2016-03-06 00:19:46 -0600 | [diff] [blame] | 76 | |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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 77 | |
| 78 | ## Pkg copy, build using GOPATH modification |
Jason Buberel | d16be8a | 2015-08-23 13:19:27 -0700 | [diff] [blame] | 79 | |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 80 | Copy packages locally. When building modify the GOPATH to reference the local package store. |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 81 | |
John Asmuth | ae6c16a | 2015-05-01 14:35:23 -0400 | [diff] [blame] | 82 | | **godep** |https://github.com/tools/godep| |
Daniel Theophanes | 1376c40 | 2015-05-01 12:01:03 -0700 | [diff] [blame] | 83 | |:----------|:-----------------------------| |
John Asmuth | ae6c16a | 2015-05-01 14:35:23 -0400 | [diff] [blame] | 84 | |Title |Helps build packages reproducibly by fixing their dependencies| |
| 85 | |Author |Keith Rarick | |
Daniel Theophanes | 19437fc | 2015-05-06 21:18:43 -0700 | [diff] [blame] | 86 | |Categories |Vendoring, Version Recording. Copies into "Godep/_workspace/src".| |
John Asmuth | ae6c16a | 2015-05-01 14:35:23 -0400 | [diff] [blame] | 87 | | | | |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 88 | | **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 Buberel | a6db58e | 2015-07-11 16:21:03 -0700 | [diff] [blame] | 92 | | | | |
Jason Buberel | a6db58e | 2015-07-11 16:21:03 -0700 | [diff] [blame] | 93 | | **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| |
7rans | f5daefd | 2016-05-02 22:24:11 -0400 | [diff] [blame] | 97 | | | | |
| 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 Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 102 | |
| 103 | ## Revision Locking |
Jason Buberel | d16be8a | 2015-08-23 13:19:27 -0700 | [diff] [blame] | 104 | |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 105 | Package source control versions are recorded. Versions are updated into the GOPATH package tree. |
| 106 | Requires switching GOPATH for every project. |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 107 | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 108 | | **glock** |https://github.com/robfig/glock| |
Jason Buberel | a6db58e | 2015-07-11 16:21:03 -0700 | [diff] [blame] | 109 | |:-----------|:-----------------------------| |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 110 | |Title |Lock dependencies to specific revisions.| |
| 111 | |Author |Rob Figueiredo | |
Rick Beton | 858acad | 2016-05-20 18:57:28 +0100 | [diff] [blame] | 112 | |Categories |Revision Locking (git, mercurial, bzr, svn) | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 113 | | | | |
| 114 | | **gobs** |https://bitbucket.org/vegansk/gobs| |
| 115 | |Title |Build system and package manager for go language| |
| 116 | |Author |Anatoly Galiulin | |
Daniel Theophanes | 0af4000 | 2015-05-02 07:07:28 -0700 | [diff] [blame] | 117 | |Categories |Revision Locking (git). Requires bash, no Windows support. | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 118 | | | | |
Spencer Nelson | d4c4380 | 2017-01-27 15:44:46 -0500 | [diff] [blame] | 119 | | **godeps** |https://github.com/rogpeppe/godeps | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 120 | |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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 123 | | | | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 124 | | **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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 133 | | | | |
| 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 Buberel | d16be8a | 2015-08-23 13:19:27 -0700 | [diff] [blame] | 139 | ## Pkg copy with import path re-write (As of Go 1.5, this is no longer the recommended practice) |
| 140 | |
| 141 | Vendoring 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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 161 | |
| 162 | ## Vendor Utilities |
| 163 | Not 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 Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 169 | |
Yandry Pozo | 65d50f4 | 2016-04-26 15:27:02 -0600 | [diff] [blame] | 170 | | **git freeze** |https://github.com/nicerobot/git-freeze| |
| 171 | |:-----------|:-----------------------------| |
| 172 | |Author |Robert Nix (nicerobot) | |
| 173 | |Categories |Easy Go vendoring via git submodule | |
| 174 | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 175 | ## Import Proxies |
| 176 | Import 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 Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 178 | | **gopkg.in** |https://gopkg.in | |
James White | dd41485 | 2015-09-22 15:07:19 +0100 | [diff] [blame] | 179 | |:----------------------|:--------------------------------------------| |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 180 | |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 Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 183 | |
| 184 | ## Go Version Managers |
| 185 | Go Version Managers allow you to have multiple versions of Go installed on your machine. It allows you to switch between those versions. |
| 186 | |
toromoti | f5db6ae | 2015-01-17 13:59:25 +0900 | [diff] [blame] | 187 | | **goenv** | https://bitbucket.org/ymotongpoo/goenv | |
| 188 | |:-----------|:---------------------------------------| |
| 189 | | Title | Go environment manager | |
| 190 | | Author | Yoshifumi YAMAGUCHI | |
| 191 | | Categories | Go Version Manager | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 192 | |
Andrew Gerrand | 5bc444d | 2014-12-10 11:35:11 +1100 | [diff] [blame] | 193 | |
| 194 | ## Client App Test Packages |
| 195 | Here 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 Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 204 | |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 White | dd41485 | 2015-09-22 15:07:19 +0100 | [diff] [blame] | 210 | * https://github.com/msiebuhr/git-version-proxy |
Daniel Theophanes | 6626fb2 | 2015-05-02 06:40:58 -0700 | [diff] [blame] | 211 | |
| 212 | ## Not Written in Go |
| 213 | These 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 Sturm | 0924b2b | 2017-01-07 19:32:24 +0100 | [diff] [blame] | 217 | * https://github.com/pote/gpm |
| 218 | * https://github.com/brettlangdon/git-vendor |