Expand description
The one boolean spelling (true / false) for params, fields
and env flags.
The one boolean spelling: true / false.
Every boolean-valued input — a CLI key=value param, a workload
field given as a string, an NMBRS_* env flag — goes through
this module. Nothing else counts as a boolean. Spellings that
other tools accept (on/off, yes/no, 1/0) are errors
that name the canonical word, so a typo never quietly becomes
false.
Functions§
- env_
flag - Read the boolean env flag
name. Unset isfalse; a set value must betrueorfalse. - is_
bool_ word - True when
rawis a canonical boolean word. - json_
bool - Read the boolean
keyfrom a workload value: a YAML/JSON bool, or a string spelledtrue/false(the form a{param}substitution or a CLI override produces). - parse_
bool - Parse
rawas the value of the booleankey.