I am trying to do a go get:
go get github.com/go-sql-driver/mysql
and it fails with the following error:
packa
GOPATH is an environment variable to your work-space location. GOROOT is an environment variable to your installation directory. Although GOROOT and GOPATH is automatically set (if there would not be a bug) during the installation time, to specify it manually you can follow below process. Moreover, for more information you can refer to GO's wiki page.
It is better to set GOPATH to a directory inside your home directory, e.g., $HOME/go, %USERPROFILE%\go (Windows).
On your Terminal type
vim ~/.profile
in opened document on the Terminal press i and add the following path
GOPATH=/path/to/a/directory/inside/home/directory
GOROOT=/path/to/you/go/library
PATH=$PATH:$GOPATH:$GOROOT:$GOROOT/bin
press ESC and type :x. Lastly, you should restart (close and open) your terminal or Logout and Login again.
CAUTION Do not set both GOROOT and GOPATH to the same directory, otherwise you will get a warning.