Skip to content

Automated JSON docs generation for Caddy modules

License

Notifications You must be signed in to change notification settings

caddyserver/moduledoc

Repository files navigation

ModuleDoc

godoc

This package implements the source analysis core of Caddy's module documentation system. It reads Go code to generate JSON docs -- kind of like godoc, but following JSON tags, and with special integration with Caddy's module architecture.

This package requires Go to be installed on the machine because it uses the packages package as well as running go commands directly. Inputs are fully-qualified package and type names, and outputs are JSON-structured type definitions and documentation. A backing data store is required for amortization.

A front-end can then be built to render the results, for example: both https://caddyserver.com/docs/json/ and https://caddyserver.com/docs/modules are powered by this package.

Author's disclaimer: This package comes with no guarantees of stability or correctness. The code is very hand-wavy, and I really had no idea what I was doing at the time, but at least it works! (Mostly.) Always refer to actual source code as authoritative documentation as the output of this package is not always perfect.

(c) 2019 Matthew Holt

About

Automated JSON docs generation for Caddy modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages