Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/vgo: report failure when $GOPATH/go.mod exists #24106
What version of Go are you using (
It looks like you have GOPATH=. and you are copying the module into that same place. The go get has the effect of creating ./src/golang.org/x/vgo, and then the COPY creates ./go.mod, so that it looks like the GOPATH's downloaded source lives inside the module. That in turn makes it look like src/golang.org/x/vgo is part of the project you are working on, and vgo gets very confused by its own (unsupported) use of vendoring.
Even if you did rm -rf src/golang.org/x/vgo after the go get, you will probably run into other problems with GOPATH and the module root being the same place. You should move one or the other instead.
I will repurpose this bug for detecting when there's a $GOPATH/go.mod and diagnosing that better.