When you run the get get command:
sudo go get github.com/go-sql-driver/mysql
I get the following error
package github.com/go-sql-driver/mysql: unable to load, do not set $ GOPATH. For more information see: go help gopath
However, $ GOPATH is already installed.
Launch echo $GOPATHgives/Users/userxyz/Desktop/Code
Launch go envgives
.....
GOPATH="/Users/userxyz/Desktop/Code"
...
GOROOT="/usr/local/go"
.....
I already tried setting GOPATH as an environment variable by adding the following lines
export GOPATH="$HOME/Desktop/Code"
export PATH=$PATH:$GOPATH/bin
to the following files, alternatively
~/.profile (/etc/profile)
~/.bashrc
~/.bash_profile
source
share