Command gddo

Command gddo fetches and serves documentation for Go programs.

For usage, see:

gddo --help

gddo supports running as an HTTP server, a Gemini server, or both. The --http and --gemini flags control which addresses gddo will listen on. If neither are specified, gddo will not listen for any connections.

When the --gemini flag is present, gddo will only accept requests for the hostname specified with the --hostname flag. gddo will also automatically generate TLS certificates as needed and place them in the directory specified with the --certs flag.

Some of gddo's features (such as search results and import graphs) require a PostgreSQL database to function. The database connection URL can be specified with the --db flag. gddo also supports standalone operation for viewing documentation locally.

If the --goproxy flag is present, gddo will fetch modules from the provided Go module proxy. Otherwise, gddo will load modules from the local Go module cache. The --modcache flag can be used to specify a different module cache directory.

The --fetch-timeout flag configures the timeout for fetching documentation. If the timeout is exceeded, gddo will continue fetching the documentation in the background. The user can refresh the page to check on its progress.

The --refresh-interval and --max-age flags control background crawling of packages in the database. To enable background crawling, specify a refresh interval greater than zero. The --max-age flag configures how old a module must be before gddo will crawl it.

gddo will sometimes make HTTP requests to fetch project information or fetch packages from a Go module proxy. The --user-agent flag configures the user agent that gddo will use for HTTP requests. The --request-timeout flag configures the timeout for roundtripping an HTTP request.

gddo supports rendering documentation for multiple platforms. To configure the default platform, specify the --platform flag.

gddo comes bundled with assets and templates. To use your own, you can specify the --assets and --templates flags.

gddo can run behind a TLS-terminating reverse proxy. In order to ensure that badge URIs use the correct scheme, have the reverse proxy set the X-Forwarded-Proto HTTP header to the desired protocol (e.g. https).

Version
v0.0.0-20220918182705-c3bf285300fd (latest)
Published
Sep 18, 2022
Platform
linux/amd64
Imports
10 packages (graph)
Last checked
1 week ago

Tools for package owners.