Expand description
The named sections a help_template may place, and how one is filled in.
A spec can say what order its help sections come in — help_template "{{about}}{{usage}}…"
— and nothing more than that. The template holds a closed vocabulary of pre-rendered
sections rather than the metadata behind them, which is what lets an interpreter, a compiled
parser and a generated Go program agree: they agree on where each section starts and ends,
not on a template language’s semantics.
The twins of this module are usage_argv::help’s SECTIONS and Sections, and Go’s
helpSections. conformance/tests/render.rs is what says the three still agree.
Constants§
- SECTIONS
- The sections a template may name, and nothing else.
Functions§
- check
- Whether every
{{…}}in a template names a section. - is_set
- Whether a template is one an author wrote, rather than an empty or whitespace-only string that should render as the default page.
- substitute
- Fill a template in, asking
sectionfor each name it holds.