Documentation
¶
Overview ¶
generate-reference generates REFERENCE.md from Cobra command metadata.
It reads REFERENCE.md (or --template), finds GENERATE marker pairs, and replaces content between START and END with generated output. Structure is controlled by the template; see REFERENCE.template.md.
Marker format:
- GENERATE_TOC:START / GENERATE_TOC:END - table of contents
- GENERATE_GLOBAL_FLAGS:START / GENERATE_GLOBAL_FLAGS:END - global options
- GENERATE:path1|path2|path3:START / GENERATE:path1|path2|path3:END - command docs (| separator)
Usage:
cp REFERENCE.template.md REFERENCE.md && go run ./tools/generate-reference go run ./tools/generate-reference --check go run ./tools/generate-reference --output docs/REFERENCE.md
Click to show internal directories.
Click to hide internal directories.