From adb13d6262c21314c01542767e816a43a68317b6 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 15 Aug 2019 11:48:19 +0200 Subject: Document go env vars --- support/go_build.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.1