Golang should be already installed. Then execute this lines:
GOPATH=`pwd` go get golang.org/x/tools/cmd/goimports
sudo ln -s `pwd`/bin/goimports /usr/bin/goimports
GOPATH=`pwd` go get golang.org/x/tools/cmd/goimports
sudo ln -s `pwd`/bin/goimports /usr/bin/goimports