I want to use Go, but I\'m having trouble running the go command. I installed go1.5.2 darwin/amd64, but when I run the command go version
, I get an error in the ter
Add Go PATH to your ~/.zshrc file. Open file to edit as -
vim ~/.zshrc
in the ~/.zshrc you should add the line:
export PATH=$PATH:/usr/local/go/bin
Once done, close and reopen terminal and you are good to go. For test, you can do -
go version
It will show output something like -
go version go1.15.1 darwin/amd64