HomeFreeBSD

Mk/Uses/go.mk: Avoid pollution of Go module cache with modules downloaded by…

Description

Mk/Uses/go.mk: Avoid pollution of Go module cache with modules downloaded by gomod-vendor

Use module cache local to the WRKDIR and add the -modcacherw flag (available in
go1.14 [1, 2]) to instruct go mod vendor to leave directories in the module
cache read-write instead of making them unwritable.

[1] https://github.com/golang/go/issues/31481
[2] https://go-review.googlesource.com/c/go/+/202079/

Reviewed by: swills
Differential Revision: https://reviews.freebsd.org/D23063