I'm having the issue of Go 1.11.4 ignoring the vendor
directory of the project I'm in.
When trying to run various commands, I get the following errors, even though the paths referenced are clearly present in the vendor directory. The error message itself appears to indicate that the vendor
directory is not even being looked at, at least not for this project that supposedly couldn't be found.
What exactly is going on, and how do I even troubleshoot this?
Below is a straight copy/paste from the terminal, after some pbpaste | sed "s#…#R#g;s#…#M#g;s#…#D#g;s#…#B#g;s#…#example.org#g;s#^#
printf \t#g" | pbcopy
script to anonymise the repositories.
ubuntu:R {607} go version
go version go1.11.4 linux/amd64
ubuntu:R {608} go build | & head -4
server.go:10:2: cannot find package "example.org/M/B" in any of:
/usr/local/go/src/example.org/M/B (from $GOROOT)
/home/ubuntu/go/src/example.org/M/B (from $GOPATH)
R.go:8:2: cannot find package "example.org/M/D" in any of:
ubuntu:R {609} ll vendor/example.org/M/B/
total 28
4 -rw-r--r-- 1 ubuntu ubuntu 156 Jan 10 17:57 .drone.yml
8 -rw-r--r-- 1 ubuntu ubuntu 6207 Jan 10 17:57 Gopkg.lock
4 -rw-r--r-- 1 ubuntu ubuntu 798 Jan 10 17:57 Gopkg.toml
4 -rw-r--r-- 1 ubuntu ubuntu 53 Jan 10 17:57 README.md
8 -rw-r--r-- 1 ubuntu ubuntu 4783 Jan 10 17:57 B.go
ubuntu:R {610} go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build981837178=/tmp/go-build -gno-record-gcc-switches"
ubuntu:R {611}