Hi! On Tue, Apr 03, 2018 at 03:25:44PM -0700, roar...@zillowgroup.com wrote: > In an effort to make sure code that builds on my local machine will build > on our build machine, I am looking for a build option to force the compiler > to only look for imported code in the vendor directory & pkg.
You can set GOPATH to directory specific to this project and either check $GOPATH/src doesn't contain anything but your project's dir before release or (untested) change $GOPATH/src permissions to 0555 to ensure `go get` won't be able to create anything there. But I doubt any of these will be convenient enough - usual way to solve this issue is run local build/test before release in isolated CI-like environment (like in a docker). If you'll have empty GOPATH in that environment and will be able to build a project without `go get` at all then it'll mean you've vendored all dependencies. Also you can try to switch to vgo - while it's experimental it should provide reproducible builds without vendoring at all. -- WBR, Alex. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.