- Remove support for installing compiled Go libs into GO_LIBDIR and source code into GO_SRCDIR [1]
- Restrict build to only main packages by adding -buildmode=exe to GO_BUILDFLAGS [2]
- Add modules argument for initial support for building in module-aware mode. Current support is basic and does two things:
- disables adding post-extract target and avoids creation of GOPATH dir structure (not needed in module mode)
- disables network access during build by adding -mod=vendor to GO_BUILDFLAGS [3]
Note: this depends on https://reviews.freebsd.org/D19568
[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#go-libs
[2] https://golang.org/cmd/go/#hdr-Build_modes
[3] https://golang.org/cmd/go/#hdr-Modules_and_vendoring