summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/go-mod.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/go-mod.bbclass')
-rw-r--r--meta/classes-recipe/go-mod.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes-recipe/go-mod.bbclass b/meta/classes-recipe/go-mod.bbclass
index 927746a338..ca3a690d05 100644
--- a/meta/classes-recipe/go-mod.bbclass
+++ b/meta/classes-recipe/go-mod.bbclass
@@ -6,7 +6,7 @@
# Handle Go Modules support
#
-# When using Go Modules, the the current working directory MUST be at or below
+# When using Go Modules, the current working directory MUST be at or below
# the location of the 'go.mod' file when the go tool is used, and there is no
# way to tell it to look elsewhere. It will automatically look upwards for the
# file, but not downwards.
@@ -24,3 +24,7 @@ inherit go
GO_WORKDIR ?= "${GO_IMPORT}"
do_compile[dirs] += "${B}/src/${GO_WORKDIR}"
+
+export GOMODCACHE = "${B}/.mod"
+
+do_compile[cleandirs] += "${B}/.mod"