summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--support/go_build.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/support/go_build.rb b/support/go_build.rb
index a705939..1ef2e17 100644
--- a/support/go_build.rb
+++ b/support/go_build.rb
@@ -10,8 +10,15 @@ module GoBuild
BUILD_DIR = File.join(ROOT_PATH, 'go_build')
GO_ENV = {
+ # $GOBIN controls where 'go install' puts binaries. Prior to go mod,
+ # this was $GOPATH/bin.
'GOBIN' => File.join(BUILD_DIR, 'bin'),
+ # Force the use of go mod, even if $GOPATH is set.
'GO111MODULE' => 'on',
+ # Downloading dependencies via proxy.golang.org is faster and more
+ # reliable than downloading from canonical sources. We need this
+ # environment variable because as of Go 1.12, the default is still to
+ # download from canonical sources.
'GOPROXY' => 'https://proxy.golang.org'
}.freeze