goimports: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/goimports - from package: golang-googlecode-tools-goimports

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/goimports - from package: golang-go.tools

You may install the required package with command apt-get install {package}
Error in other languages:
goimports: bevel nie gevind nie
goimports: comandă negăsită
goimports: comando não encontrado
goimports: commande introuvable
goimports: command not found
goimports: käsku ei ole
goimports: không tìm thấy lệnh
goimports: komanda nerasta
goimports: Kommando nicht gefunden.
goimports: kommandot finns inte
goimports: komut yok
goimports: nie znaleziono polecenia
goimports: níor aimsíodh an t-ordú
goimports: no se encontró la orden
goimports: no s'ha trobat l'ordre
goimports: opdracht niet gevonden
goimports: parancs nem található
goimports: perintah tidak ditemukan
goimports: príkaz nenájdený
goimports: příkaz nenalezen
goimports: команда не найдена
goimports: командата не е открита
goimports: 命令找不到
goimports: コマンドが見つかりません