4 ms·
Vendoring only works inside a GOPATH; if you're outside the GOPATH, the vendor/ folder is ignored. https://github.com/golang/go/issues/14566 https://github.com
by shadowmint 10y ago
Vendoring only works inside a GOPATH; if you're outside the GOPATH, the vendor/ folder is ignored.
https://github.com/golang/go/issues/14566 https://github.com/golang/go/issues/14566
There are many problems with running outside GOPATH. Among others, there's no
caching of built object files, so everything is much slower than it should be
(go build, go test, and so on). Vendoring is pretty low on the list of problems.
It may be that GOPATH should be reconsidered but if so it should be done as a
whole change, not just one piece at a time, like @bradfitz said above.
The solution for now is to use GOPATH.
> rsc closed this on 6 Dec 2016
Once the new dependency tool is done, it seems like GOPATH will be increasingly irrelevant with vendored dependencies and proper tooling.
(You may also be interested in this extended and active discussion on getting rid of GOPATH; https://github.com/golang/go/issues/17271 https://github.com/golang/go/issues/17271)
- thegeekpirate 10y agoYou're absolutely correct—I just tested it, and I'll be damned. That's what I get for never playing around with it, and had (wrongly) assumed that this would have been one of the most basic features of vendoring. I appreciate the correction!