gen_config_docs

command
v0.20.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL