From 6bd7b530a1c9c9db301d6694ad5556936e32c7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 25 Aug 2018 17:58:04 +0200 Subject: [PATCH] Use Go 1.11 modules with Mage See #5115 --- magefile.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/magefile.go b/magefile.go index e8a9a7b5f9c..310c4ba66d8 100644 --- a/magefile.go +++ b/magefile.go @@ -32,6 +32,10 @@ func init() { if exe := os.Getenv("GOEXE"); exe != "" { goexe = exe } + + // We want to use Go 1.11 modules even if the source lives inside GOPATH. + // The default is "auto". + os.Setenv("GO111MODULE", "on") } func getDep() error {