Documentation
¶
Overview ¶
docgen generates internal/handler/docs_gen.go containing Markdown documentation for Caddyfile directives, extracted from Caddy's source code.
It handles two patterns used in Caddy:
- Types with an UnmarshalCaddyfile method — the method doc comment contains the directive's Caddyfile syntax.
- Standalone functions registered via httpcaddyfile.RegisterDirective or RegisterHandlerDirective — the function doc comment contains the syntax.
Only doc comments that contain a fenced code example (tab-indented lines in Go doc convention) are kept; plain-text-only docs are skipped.
Run via go generate from the project root:
go generate ./internal/handler/
Click to show internal directories.
Click to hide internal directories.