Releases: urfave/cli
Releases · urfave/cli
v1.18.0
Added
./runteststest runner with coverage tracking by default- testing on OS X
- testing on Windows
UintFlag,Uint64Flag, andInt64Flagtypes and supporting code
Changed
- Use spaces for alignment in help/usage output instead of tabs, making the
output alignment consistent regardless of tab width
Fixed
- Printing of command aliases in help text
- Printing of visible flags for both struct and struct pointer flags
- Display the
helpsubcommand when usingCommandCategories - No longer swallows
panics that occur within theActions themselves when
detecting the signature of theActionfield
v1.17.0
Added
- Pluggable flag-level help text rendering via
cli.DefaultFlagStringFunc context.GlobalBoolTwas added as an analogue tocontext.GlobalBool- Support for hiding commands by setting
Hidden: true-- this will hide the
commands in help output
Changed
Float64Flag,IntFlag, andDurationFlagdefault values are no longer
quoted in help text output.- All flag types now include
(default: {value})strings following usage when a
default value can be (reasonably) detected. IntSliceFlagandStringSliceFlagusage strings are now more consistent
with non-slice flag types- Apps now exit with a code of 3 if an unknown subcommand is specified
(previously they printed "No help topic for...", but still exited 0. This
makes it easier to script around apps built usingclisince they can trust
that a 0 exit code indicated a successful execution. - cleanups based on Go Report Card
feedback
v1.16.0
Added
Hiddenfield on all flag struct types to omit from generated help text
Changed
BashCompletionFlag(--enable-bash-completion) is now omitted from
generated help text via theHiddenfield
Fixed
- handling of error values in
HandleActionandHandleExitCoder
v1.15.0
Added
- A
CHANGELOG.mdfile! - Support for placeholders in flag usage strings
App.Metadatamap for arbitrary data/state managementSetandGlobalSetmethods on*cli.Contextfor altering values after
parsing.- Support for nested lookup of dot-delimited keys in structures loaded from
YAML.
Changed
- The
App.ActionandCommand.Actionnow prefer a return signature of
func(*cli.Context) error, as defined bycli.ActionFunc. If a non-nil
erroris returned, there may be two outcomes:- If the error fulfills
cli.ExitCoder, thenos.Exitwill be called
automatically - Else the error is bubbled up and returned from
App.Run
- If the error fulfills
- Specifying an
Actionwith the legacy return signature of
func(*cli.Context)will produce a deprecation message to stderr - Specifying an
Actionthat is not afunctype will produce a non-zero exit
fromApp.Run - Specifying an
Actionfunc that has an invalid (input) signature will
produce a non-zero exit fromApp.Run
Deprecated
cli.App.RunAndExitOnError, which should now be done by returning an error
that fulfillscli.ExitCodertocli.App.Run.- the legacy signature for
cli.App.Actionoffunc(*cli.Context), which should now have a return
signature offunc(*cli.Context) error, as defined bycli.ActionFunc.
Fixed
- Added missing
*cli.Context.GlobalFloat64method