I am trying to do a go get:
go get github.com/go-sql-driver/mysql
and it fails with the following error:
packa
You have to update the PATH based on the terminal(bash or zsh) which you use.
~/.bashrc or ~/.zshrc in an editorvi ~/.zshrc (or) code ~/.zshrc
export GOPATH=$HOME/go:/$HOME/projects/go
Here you can add one or more paths separated by a semicolon : from different locations of your GO projects on the system to the GOPATH environment variable i.e /path/1:path/2:path/3 etc.
In my case, I have added 2 paths, as shown above, one from the root $HOME/go and the other one from the projects directory :/$HOME/projects/go