How to Publish a Go Package to pkg.go.dev

Publish a Go package to pkg.go.dev by tagging a version in your public Git repository and pushing the tag.

Publishing a Go package to pkg.go.dev happens automatically when you tag a version in a public Git repository and push it. Ensure your repository has a valid go.mod file, then create a semantic version tag and push it to your remote.

git tag v1.0.0
git push origin v1.0.0

pkg.go.dev will detect the new tag and generate documentation within a few minutes.