title: Error "Package ... is not in GOROOT " when "go run"
body: <p>Firstly, I want to say thank u for reading my topic. I am newbie in Golang so nice to receive your help. <br />
  I am using golang for <code>php-fpm-exporter</code>
  (<a href="https://github.com/hipages/php-fpm_exporter" rel="nofollow noreferrer">https://github.com/hipages/php-fpm_exporter</a>)<br />
  My environment <code>go env</code></p>
  <pre><code>GO111MODULE=&quot;&quot;
  GOARCH=&quot;amd64&quot;
  GOBIN=&quot;&quot;
  GOCACHE=&quot;/home/toandp99/.cache/go-build&quot;
  GOENV=&quot;/home/toandp99/.config/go/env&quot;
  GOEXE=&quot;&quot;
  GOFLAGS=&quot;&quot;
  GOHOSTARCH=&quot;amd64&quot;
  GOHOSTOS=&quot;linux&quot;
  GOINSECURE=&quot;&quot;
  GONOPROXY=&quot;&quot;
  GONOSUMDB=&quot;&quot;
  GOOS=&quot;linux&quot;
  GOPATH=&quot;/home/toandp99/go&quot;
  GOPRIVATE=&quot;&quot;
  GOPROXY=&quot;https://proxy.golang.org,direct&quot;
  GOROOT=&quot;/home/toandp99/local/go&quot;
  GOSUMDB=&quot;sum.golang.org&quot;
  GOTMPDIR=&quot;&quot;
  GOTOOLDIR=&quot;/home/toandp99/local/go/pkg/tool/linux_amd64&quot;
  GCCGO=&quot;gccgo&quot;
  AR=&quot;ar&quot;
  CC=&quot;gcc&quot;
  CXX=&quot;g++&quot;
  CGO_ENABLED=&quot;1&quot;
  GOMOD=&quot;&quot;
  CGO_CFLAGS=&quot;-g -O2&quot;
  CGO_CPPFLAGS=&quot;&quot;
  CGO_CXXFLAGS=&quot;-g -O2&quot;
  CGO_FFLAGS=&quot;-g -O2&quot;
  CGO_LDFLAGS=&quot;-g -O2&quot;
  PKG_CONFIG=&quot;pkg-config&quot;
  GOGCCFLAGS=&quot;-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build100112555=/tmp/go-build -gno-record-gcc-switches&quot;
  </code></pre>
  <p>when I try <code>php-fpm-exporter</code> <br /></p>
  <pre><code>toandp99@toandp99-x555uj:~/php-fpm_exporter$ ls
  cmd                 Dockerfile  LICENSE   phpfpm       README.md
  CODE_OF_CONDUCT.md  go.mod      main.go   PHP-FPM.pid  sonar-project.properties
  config.sh           go.sum      Makefile  PHP-FPM.sh   test
  toandp99@toandp99-x555uj:~/php-fpm_exporter$ ./PHP-FPM.sh start
  Starting Monitoring FastCGI Process Manager...go: downloading github.com/spf13/cobra v0.0.7
  go: downloading github.com/speps/go-hashids v2.0.0+incompatible
  go: downloading github.com/davecgh/go-spew v1.1.1
  go: downloading github.com/gosuri/uitable v0.0.4
  go: downloading github.com/tomasen/fcgi_client v0.0.0-20180423082037-2bb3d819fd19
  go: downloading github.com/fatih/color v1.9.0
  go: downloading github.com/mattn/go-isatty v0.0.12
  go: downloading golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527
  go: downloading github.com/spf13/pflag v1.0.5
  go: downloading github.com/mattn/go-colorable v0.1.6
  go: downloading github.com/prometheus/client_golang v1.5.1
  go: downloading github.com/mattn/go-runewidth v0.0.8
  go: downloading github.com/prometheus/common v0.9.1
  go: downloading github.com/prometheus/client_model v0.2.0
  go: downloading github.com/cespare/xxhash v1.1.0
  go: downloading github.com/prometheus/procfs v0.0.10
  go: downloading github.com/golang/protobuf v1.3.4
  go: downloading github.com/cespare/xxhash/v2 v2.1.1
  go: downloading github.com/beorn7/perks v1.0.1
  go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
  cmd/server.go:29:2: package client_golang-master/prometheus is not in GOROOT (/home/toandp99/local/go/src/client_golang-master/prometheus)
  cmd/server.go:30:2: package client_golang-master/prometheus/promhttp is not in GOROOT (/home/toandp99/local/go/src/client_golang-master/prometheus/promhttp)
  cmd/root.go:29:2: package cobra-master is not in GOROOT (/home/toandp99/local/go/src/cobra-master)
  cmd/root.go:27:2: package go-homedir is not in GOROOT (/home/toandp99/local/go/src/go-homedir)
  cmd/root.go:28:2: package logrus-master is not in GOROOT (/home/toandp99/local/go/src/logrus-master)
  cmd/root.go:26:2: package php-fpm_exporter/phpfpm is not in GOROOT (/home/toandp99/local/go/src/php-fpm_exporter/phpfpm)
  cmd/root.go:30:2: package viper-master is not in GOROOT (/home/toandp99/local/go/src/viper-master)
  </code></pre>
  <p>In bash file (PHP-FPM.sh), I run this command</p>
  <pre><code>go run main.go server --web.listen-address $PHP_FPM_WEB_LISTEN_ADDRESS --log.level=$PHP_FPM_LOG_LEVEL --phpfpm.scrape-uri $PHP_FPM_SCRAPE_URI --web.telemetry-path $PHP_FPM_WEB_TELEMETRY_PATH --phpfpm.fix-process-count = $PHP_FPM_FIX_PROCESS_COUNT
  </code></pre>
  <p>I don't know to fix this error :( <br />
  Thanks &lt;3</p>