Go Modules Source Viewer

by Geomys

This service provides a web interface to view Go modules source code directly from the Go Modules Mirror. It supports browsing module versions, directories, and files with syntax highlighting, as well as linking to lines and line ranges.

You can replace go.dev in a pkg.go.dev URL with geomys.dev to browse the source of any public Go package. For example:

https://pkg.go.dev/filippo.io/age → https://pkg.geomys.dev/filippo.io/age
https://pkg.go.dev/filippo.io/age@v1.3.1 → https://pkg.geomys.dev/filippo.io/age@v1.3.1
https://pkg.go.dev/filippo.io/age@v1.3.1/tag → https://pkg.geomys.dev/filippo.io/age@v1.3.1/tag

The Go Checksum Database guarantees that every Go client uses the same source code for a given module version, forever. However, browsing source code on a code host like GitHub can be confusing or even hide intentional malicious code, since the code there may not match what Go actually uses. This service provides a way to view the correct source code for any public Go module, directly from the Go Modules Mirror.

Tip: to review the correct code locally, use the go mod download command to fetch the module.

cd $(go mod download -json filippo.io/age@v1.3.1 | jq -r .Dir)

If you use a code agent, add the following line to your AGENTS.md or CLAUDE.md:

To see source files from a dependency, or to answer questions about a dependency, run `go mod download -json MODULE` and use the returned `Dir` path to read the files.