The error is because the go path is not set.
To solve this error, you can do the following
1. Find where you have installed go lang.
whereis go
2. Export using the following command:
export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin
3. Add GOROOT/bin to your PATH
This should solve the error.