I had recently lamented that due to Go’s strict module security
policy it was unreasonably difficult to experiment and practice with
modules. Modules can only be fetched from servers with valid TLS
certificates, including both the module path and repository servers.
Setting up a small, local experiment meant creating a certificate
authority, generating and signing certificates, and installing these all
in the right places. I’d much rather relax Go’s security policy for the
As a result of that complaint, I learned that the upcoming Go
1.14 has as a new feature:
GOINSECURE. It’s like the old
-insecure option, but safer due to being finer grained: a whitelist of
exceptions. It’s exactly what I needed. Since then I’ve been using it to
run small module experiments. It started as some scripts, but I
eventually formalized it into its own little project.
https://github.com/skeeto/go-module-testbed [requires Go 1.14]