Documentation
¶
Overview ¶
Package docsgen generates per-package README.md files from Go doc comments (MC-11, model A: fully generated, no marker regions). Each README carries the package doc comment plus link-outs to pkg.go.dev (the canonical API reference for a public Go module) and to the project wiki (narrative/rationale). It never touches the module's own root README.md, which is hand-authored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate walks root's module and writes a README.md alongside every documented package: an importable package (excluding cmd/, internal/, examples/, testdata, and the module root itself) with a package doc comment and at least one exported identifier. Output is deterministic: identical input yields byte-identical output across runs.
Types ¶
type Config ¶
type Config struct {
// WikiBaseURL is the base URL used for each package's wiki guide
// link-out. When empty, it is derived from the module path (assumed
// github.com/<org>/<repo>): https://github.com/<org>/<repo>/wiki.
WikiBaseURL string
// Logf, when set, receives one line per documented or skipped
// package. Skips are logged with a reason.
Logf func(format string, args ...any)
}
Config controls docsgen's generation behavior.