Install GO after downloading from https://golang.org/dl/
Set GOPATH to directory you want to keep your package and source files.
export GOPATH=~/go
Update PATH to add GO binary location
export PATH=~/go/bin:$PATH
go get will fetch package and put it under your $GOPATH/src/ directory
If you're used to fork repo and submit PR for fixes/updates, the issue with GO based projects is that, source will have import statements with package name path that of original repo. Use following steps to avoid this error while building.
- fork the repo
- go get original repo
- cd $GOPATH/src/
- If git remote 'origin' is set, remove it and add remote 'origin' pointing to your fork repo
- add remote upstream pointing to original repo to fetch and pull down changes. or any additional remote that you're collaborating with