to alleviate problems caused by the circular dependency of using the
same code as a library that is potentially being generated to adhere to
a different API.
Fix timestamp flag error when using help
--
I'm merging this with the codecov patch check failing because this fixes a bug in code that wasn't sufficiently covered prior to the fix. In other words, I don't consider this codecov failure to be specific to this PR.
Approve v2 addition of App.DefaultCommand
@jalavosus FYI I'm merging this now with the intent to tag and push `v2.11.0`, and I'm happy to see further documentation improvements released later.
includes:
- running each example through `goimports`
- wrapping text at ~80 cols
- consistently using `&cli.App{...}`
- consistently using code example gates
- removing trailing blankspace
Fixes vulnerability: https://github.com/advisories/GHSA-hp87-p4gw-j4gq
YAML v3 deserializes maps as map[string]interface{} so we handle this in
MapImportSource now.
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
The SliceFlag implementation and associated aliases (MultiStringFlag, etc)
extend the existing slice implementations (StringSliceFlag, etc) to support
actual slices as the flag value and destination.
This change also fixes various bugs in the existing implementation. Notably,
the StringSliceFlag.Apply implementation would modify the input (default)
Value, if an env var was set, and no destination was provided. The bugs fixed
in the other three implementations were all already fixed in either
StringSliceFlag, or in one case (ignoring empty env var) in Float64SliceFlag.
This commit replaces github.com/antzucaro/matchr (GPL2, introduced in v2.7.0)
with github.com/xrash/smetrics (MIT License).
Fixes issue 1404
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
We could try to automatically detect the terminal width and wrap at that
point, but this would increase the binary footprint for all users even
if not using this feature.
Instead, we can allow users to specify their preferred line length limit
(if any), and those who want to bear the cost of checking the terminal
size can do so if they wish. This also makes the feature more testable.
Original patch by Sascha Grunert <sgrunert@suse.com>