Go

Pratique serves the Go module proxy protocol at /go. Set it as your GOPROXY, without direct, so every module download goes through it.

The examples use https://pratique.example.com. Use your own server's public URL. Connect clients in the web UI shows these settings for your server, and the token page shows them with your token filled in. To create a token, see access tokens.

Set up Go

Point Go at Pratique for modules and for checksum lookups:

bashgo environment
go env -w GOPROXY=https://pratique.example.com/go GONOSUMDB= GONOPROXY= GOPRIVATE=
  • GOPROXY names only Pratique. If you add direct, Go fetches from the source repository whenever Pratique answers "not found", and that download skips every check.
  • GONOSUMDB, GONOPROXY and GOPRIVATE are set to empty, so no module skips Pratique or the checksum check. Set GOPRIVATE only for your internal modules. See internal modules.

Add your token to ~/.netrc. Go reads it for each request to that host:

text~/.netrc
machine pratique.example.com login token password YOUR_TOKEN

The machine must match the host in your GOPROXY address exactly, including the port if it has one, such as pratique.example.com:8443. Go only sends these credentials over HTTPS. The token page writes the line in the right form for your server.

HTTPS

Go only accepts a GOPROXY served over HTTPS, or one on a local address with GOINSECURE set. Run Pratique with HTTPS for Go clients. See install.

Checksum verification

The Go proxy protocol lists no hashes. So Pratique verifies every file against sum.golang.org, Go's public checksum database. That database is a public log that cannot be quietly rewritten, and Pratique also checks that it agrees with what it showed before.

  • If the database cannot vouch for a file, it is not served. Go gets an error that says the version "can't be verified against the Go checksum database".
  • Checksum lookups pass through Pratique, so the go command still checks each module against go.sum and the database itself.
  • If the database fails a check, an incident opens. See incidents.

Held and refused versions

Pratique leaves held and refused versions out of the version list that Go reads. So go get example.com/mod@latest gets the newest cleared version.

If you ask for a held or refused version by number, or go.mod requires one, Pratique answers HTTP 403 with the reason and a link to the package page:

textmessage from Pratique
pratique: held example.com/mod@v1.4.0: in quarantine until 2026-12-08 09:15 UTC. To see why, or request an exception, open https://pratique.example.com/packages/go/example.com/mod?version=v1.4.0#why

Without a valid token, Pratique answers HTTP 401, with a message that says where to create a token.

Quarantine, threat data, exceptions, teams and the rules that use dates work as they do for the other registries. pratique inventory reads go.sum, so your projects' Go modules appear under Projects. See CI.

Internal modules

Pratique does not host Go modules, and it never proxies a module path that matches a reserved pattern. Such a request gets HTTP 404, and the name is never sent to the public proxy or the checksum database.

Set GOPRIVATE to your internal module paths, so Go fetches them straight from your own source control:

bashinternal modules
go env -w GOPRIVATE=git.example.com/acme/*

GOPRIVATE also makes Go skip the proxy and the checksum database for those paths. Use a pattern that covers only your own modules.

Limits

Go's protocol gives Pratique less to work with than npm or PyPI. Know these limits:

  • A release's date comes from its commit, which its author controls. Once Pratique has seen a module, a new tag dated before the last listing has its quarantine clock started when Pratique first sees it. So tagging an old commit does not skip quarantine. The first time Pratique sees a module, and for pseudo-versions, it takes the date as given.
  • Some risk rules do not apply. Go has no install step, and its protocol does not give a publisher, a license or provenance. So the install script, publisher, license and provenance rules do nothing for Go.
  • A module with no tagged release has no latest version on Pratique. Ask for a specific version instead.