Repository navigation
v0.8.0
Breaking changes to the CLI
The argument syntax has changed. -xbar and --foo=bar are no longer accepted. Please use -x bar and --foo bar. Short flags can also no longer be combined, except for -vv and -vvv. See the technical details below for why this change was made.
Other changes:
- Removed
-nand--tries. You can use either-aor--attempts. - Changed the
-d/--delaybehavior to extend the maximum delay when it is shorter. - Increased the default number of attempts from 5 to 10.
Logging improvements
- Added verbosity level 3 to display internal configuration on startup.
- Improved duration formatting to remove trailng zeroes and units.
1h0m0snow displays as1h. Zero durations show as0instead of0s.
Technical details about the CLI
This release introduces a custom argument parser to address issues we had with Kong 1.2.1 (negative numbers treated as flags—alecthomas/kong#315; passthrough passing through a flag as the command—alecthomas/kong#463). After evaluating several Go CLI libraries as potential alternatives, I found that none of them could fully replicate what we did with argparse in Python. The issues with other libraries center around passthrough and a lack of customization (for example, having an easy way to hide a default value). Since our needs are pretty simple—no subcommands or mutual exclusion logic—I came to the conclusion that a custom parser would be more maintainable than working around the limitations of existing libraries.