I had same issue. Then found the below solution on the book "Learning Go" of O'REILLY.
If you are on a Unix-like system using bash, add the following lines to your .profile.
(If you are using zsh, add these lines to .zshrc instead):
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
You’ll need to source $HOME/.profile to make these changes take effect in your cur‐
rent terminal window.
On Windows, run the following commands at the command prompt:
setx GOPATH %USERPROFILE%\go
setx path "%path%;%USERPROFILE%\bin"
After running these commands, you must close your current command prompt and
open a new one for these changes to take effect.