- Place the
galapagos
folder in yourGOCODE
src folder, usually~/code/gocode/src
.
Note: Don't install Go using Homebrew, or autocomplete will not work in Atom correctly.
-
Install Go as a binary distribution from: https://golang.org/
-
Install Godep (for dependency management):
$ go get github.com/tools/godep
Atom is the recommended text editor for Go source.
-
Install Atom.
-
Install the following packages in Atom:
- autocomplete-plus
- go-plus
Note: The only time you need to use godep is when you add a new dependency to an application or update an existing dependency that is already vendored in your application.
-
Use go-get to get the dependency (EXAMPLE):
$ go get -u github.com/russross/blackfriday
-
Add a relevant import in a Go file:
import "github.com/russross/blackfriday"
-
Vendor the additional import (records it, copies it to Godeps/, rewrites imports):
$ godep save -r ./...
$ go get -u <dependency>
$ godep update <dependency>