Documentation
¶
Overview ¶
Package main generates docs/CONFIGURATION.md from the Go-Trust config structs.
Unlike vc/go-wallet-backend, go-trust's config has no `envconfig`-style struct tags — environment variable overrides are hand-written in pkg/config/config.go's applyEnvOverrides(), and only cover a subset of fields (Server/Logging/Security; Registries/Policies have no env override support at all). So this tool parses applyEnvOverrides itself to build the real GT_* mapping, instead of mechanically constructing an env var name for every field — fabricating one for a field that isn't actually overridable would be documenting something false.
It parses config struct files using go/ast and extracts YAML keys, types, and comments (both doc comments and inline comments) to produce a Markdown configuration reference.
Usage:
go run developer_tools/scripts/gen_config_docs/main.go [-root /path/to/project] [-out docs/CONFIGURATION.md]