by zachgersh · 6y ago · 0 comments
You should be able to pull all your modules from a proxy, minus any private repos you control (which you can either setup our own proxy for OR set The GOPROXY var to go direct to vcs for it).
Also, not vendoring should give you a smaller repo and build speed shouldn’t suffer too much (proxy caching and such).
While things are better in Go 1.14, it is not solved. I do not want to set up a company proxy for our private repos. I can't count how many times some combination of GOPROXY, private repos, vendoring, and modules have been a problem.
So if I have a mix of private and public dependencies that I pull in, can I specify a specific proxy for the private ones? Is it the GOPRIVATE env var?
You can also just let your GOPROXY fallback go “direct” which will then go straight to vcs (you need to make sure you have a gitconfig setup to redirect https to ssh).