GOPATH specifies the location of your
go workspace. By default this will be
You should set your
.bash_profile to be used later in scripts or shell.
Add the followings into your
export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin
Reload your shell and done.
To confirm that it’s working, enter
$GOPATH in your shell and it should take you to the
go workspace directory.