toggles-gen

command
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

toggles-gen renders site/content/docs/use/reference.md's `strict` block argument table from internal/live/strict's own strict.Toggles registry (GitHub issue #365's consolidation).

Unlike tools/tagverbs-gen, this generator needs no network fetch and writes no separate JSON artifact: strict.Toggles IS the committed source, a Go value in the tree already, so rendering it is a pure in-process transform. That is also why docspan_test.go's drift guard needs no companion artifact-reading step the way tools/tagverbs-gen/docspan_test.go's TestSpansAreCurrent does - it calls [renderToggleTable] on strict.Toggles directly.

A 2026-08-24 audit of issue #365 found the table this generator now owns entirely hand-maintained, with strict.Toggle.Doc (and the rest of the registry) read by nothing: the "reference page is rendered from the schema" claim in HANDOFF.md's default section was false. This closes that gap for the `strict` block table specifically; the `record_store` and `policy` block tables above it in reference.md are still hand-written, because neither has a registry like strict.Toggles to render from yet.

Usage, from anywhere in the checkout:

go run ./tools/toggles-gen

Jump to

Keyboard shortcuts

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