The Go get tool

Go get is a tool to get third party projects from CVS repositories. Instead of using the git clone command, you can use Go get to receive a series of added benefits. Let's write an example using CoreOS's ETCD project which is a famous distributed key-value store.

CoreOS's ETCD is hosted on GitHub at  https://github.com/coreos/etcd.git. To download this project source code using the Go get tool, we must type in the Terminal it's resulting import path that it will have in our GOPATH:

$ go get github.com/coreos/etcd

Note that we have just typed the most relevant information so that Go get figures out the rest. You'll get some output, depending on the state of the project, but after, while, it will disappear. But what did happen?

  • Go ...

Get Go: Design Patterns for Real-World Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.