Golang — When commands didn’t work for packages installed via go get {package path}
1 min readMar 18, 2020
When installed modules didn’t available as commands over terminal, Do the following to fix.
Set your GOPATH and GOROOT.
GOPATH is your workspace.
GOROOT is where it is installed.
Open a terminal and run the following commands to make things work
export GOPATH=$HOME/go
or whatever your path and update system path.
export PATH=$PATH:$GOPATH/bin;
Now installed packages or modules available in your terminal.
or Place the above lines in your ~/.bash_profile and do the following
source ~/.bash_profile