Package types
Go
Use a Go repository as your GOPROXY, with checksum verification, and publish modules to it.
This command sets GOPROXY (and GONOSUMDB from --private) with go env -w, and writes
your credentials to ~/.netrc:
relic package setup go go --private 'corp.example.com/*' --write
Build through Relic:
go build ./...
Publish a module version (zip, go.mod and .info):
relic package publish go go-local v1.2.3 --dir .
To configure Go by hand, set the proxy and your private module prefixes:
export GOPROXY=https://relic.example.com/go/go
export GONOSUMDB=<your private module prefixes>
Add the credentials to ~/.netrc:
printf 'machine relic.example.com\nlogin <you>\npassword <token>\n' >> ~/.netrc
The go command matches the port too: on a server with a port in its URL, the machine is
relic.example.com:8090. relic package setup writes both forms.
For a private CA (TLS), set SSL_CERT_FILE.
A remote of https://proxy.golang.org caches public modules. A Go remote, or a virtual
repository with one, also serves the checksum database (sum.golang.org), so go.sum is
verified without internet access. Private modules are not in it: list them in GONOSUMDB.