config-ref

command
v2.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command config-ref emits docs/docs/reference/config.md from two kinds of sources:

  • Struct tables (structSources): AST-parse a Go file's root struct and every nested struct it references, recursively, collecting each field with a `toml:"..."` tag. Dotted path + Go doc comment
  • type become a row. Covers the TOML config plus the protection and opportunity policy files.
  • Environment variables: scan all .go files under the repo root for `// docgen:env NAME | description` comments. Name + the description after `|` become a row.

Invoked by `make docs-regen` (writes the file) and `make docs-check` (writes to a tempfile, diffs against the checked-in copy, fails CI if they drift). Convention is: add a field or env var, add the docgen comment in the same patch, regenerate, commit together.

Jump to

Keyboard shortcuts

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