summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--auto/modules/go2
-rw-r--r--test/unit/applications/lang/go.py1
-rw-r--r--test/unit/check/go.py1
3 files changed, 3 insertions, 1 deletions
diff --git a/auto/modules/go b/auto/modules/go
index 8bb9216e..7324ffbe 100644
--- a/auto/modules/go
+++ b/auto/modules/go
@@ -111,7 +111,7 @@ install: ${NXT_GO}-install
${NXT_GO}:
${NXT_GO}-install: ${NXT_GO}-install-src ${NXT_GO}-install-env
- GOPATH=\$(DESTDIR)\$(GOPATH) ${NXT_GO} build ${NXT_GO_PKG}
+ GOPATH=\$(DESTDIR)\$(GOPATH) GO111MODULE=auto ${NXT_GO} build ${NXT_GO_PKG}
${NXT_GO}-install-src:
install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py
index a17b1af4..6be1667b 100644
--- a/test/unit/applications/lang/go.py
+++ b/test/unit/applications/lang/go.py
@@ -13,6 +13,7 @@ class TestApplicationGo(TestApplicationProto):
env = os.environ.copy()
env['GOPATH'] = option.current_dir + '/build/go'
env['GOCACHE'] = option.cache_dir + '/go'
+ env['GO111MODULE'] = 'auto'
if static:
args = [
diff --git a/test/unit/check/go.py b/test/unit/check/go.py
index 35b0c2d5..309091c0 100644
--- a/test/unit/check/go.py
+++ b/test/unit/check/go.py
@@ -8,6 +8,7 @@ def check_go(current_dir, temp_dir, test_dir):
env = os.environ.copy()
env['GOPATH'] = current_dir + '/build/go'
+ env['GO111MODULE'] = 'auto'
try:
process = subprocess.Popen(