flagforge allows you to automatically generate Go flag code, as well as the associated Markdown and HTML documentation for those flags, all using a single configuration file. This means you only have to define your command-line options once in a TOML file, and flagforge will do the rest.
Clone the repo and execute go build
. Pass -h
to flagforge
to learn how to use it.
flagforge -f go|markdown|html <TOML file>
rqlite uses flagforge to generate the code and documentation for its extensive set of command-line flags:
- rqlite TOML file
- Generated Go code for command-line flag parsing, and then calling the generated code from rqlite.
- Example of automatically generated HTML documentation for the flags deployed to production site. You can review the generated HTML here.