Releases: urfave/cli
Releases · urfave/cli
v1.16.0
Added
Hidden
field on all flag struct types to omit from generated help text
Changed
BashCompletionFlag
(--enable-bash-completion
) is now omitted from
generated help text via theHidden
field
Fixed
- handling of error values in
HandleAction
andHandleExitCoder
v1.15.0
Added
- A
CHANGELOG.md
file! - Support for placeholders in flag usage strings
App.Metadata
map for arbitrary data/state managementSet
andGlobalSet
methods on*cli.Context
for altering values after
parsing.- Support for nested lookup of dot-delimited keys in structures loaded from
YAML.
Changed
- The
App.Action
andCommand.Action
now prefer a return signature of
func(*cli.Context) error
, as defined bycli.ActionFunc
. If a non-nil
error
is returned, there may be two outcomes:- If the error fulfills
cli.ExitCoder
, thenos.Exit
will be called
automatically - Else the error is bubbled up and returned from
App.Run
- If the error fulfills
- Specifying an
Action
with the legacy return signature of
func(*cli.Context)
will produce a deprecation message to stderr - Specifying an
Action
that is not afunc
type will produce a non-zero exit
fromApp.Run
- Specifying an
Action
func 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.ExitCoder
tocli.App.Run
.- the legacy signature for
cli.App.Action
offunc(*cli.Context)
, which should now have a return
signature offunc(*cli.Context) error
, as defined bycli.ActionFunc
.
Fixed
- Added missing
*cli.Context.GlobalFloat64
method