Make golang::setup-env turn on workspaces

Both GO111MODULE and GOWORK default to on, so this just unsets them.  We
could set them to explicit values but this seems equivalent and cleaner.
This commit is contained in:
Tim Hockin
2024-02-28 11:43:18 -08:00
parent 2e2ae029c3
commit 81ba0f3b44
4 changed files with 14 additions and 13 deletions

View File

@@ -582,8 +582,9 @@ kube::golang::setup_env() {
# Cross-compiles will not work with it set.
unset GOBIN
# Explicitly turn on modules.
export GO111MODULE=on
# Turn on modules and workspaces (both are default-on).
unset GO111MODULE
unset GOWORK
# This may try to download our specific Go version. Do it last so it uses
# the above-configured environment.