diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-08-15 11:48:19 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2019-08-15 11:48:19 +0200 |
commit | adb13d6262c21314c01542767e816a43a68317b6 (patch) | |
tree | fe6058c6897d58e738977206afdb1ad6b466daa2 | |
parent | 308b46828a19e292712169268d315384a45f36e6 (diff) | |
download | gitlab-shell-jv-go-mod.tar.gz |
Document go env varsjv-go-mod
-rw-r--r-- | support/go_build.rb | 7 |
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 |