Command pkgsite

Pkgsite extracts and generates documentation for Go programs. It runs as a web server and presents the documentation as a web page.

To install, run `go install ./cmd/pkgsite` from the pkgsite repo root.

With no arguments, pkgsite will serve docs for the module in the current directory, which must have a go.mod file:

cd ~/repos/cue && pkgsite

This form will also serve all of the module's required modules at their required versions. You can disable serving the required modules by passing -list=false.

You can also serve docs from your module cache, directly from the proxy (it uses the GOPROXY environment variable), or both:

pkgsite -cache -proxy

With either -cache or -proxy, pkgsite won't look for a module in the current directory. You can still provide modules on the local filesystem by listing their paths:

pkgsite -cache -proxy ~/repos/cue some/other/module

Although standard library packages will work by default, the docs can take a while to appear the first time because the Go repo must be cloned and processed. If you clone the repo yourself (https://go.googlesource.com/go), you can provide its location with the -gorepo flag to save a little time.

Version
v0.0.0-20221104164938-e7143b5d335c (latest)
Published
Nov 4, 2022
Platform
linux/amd64
Imports
24 packages (graph)
Last checked
2 weeks ago

Tools for package owners.