urfave/cli v1.19.0 Release Notes
Release Date: 2016-11-19 // over 7 years ago-
➕ Added
FlagsByName
was added to make it easy to sort flags (e.g.sort.Sort(cli.FlagsByName(app.Flags))
)- A
Description
field was added toApp
for a more detailed description of
the application (similar to the existingDescription
field onCommand
) - Flag type code generation via
go generate
- Write to stderr and exit 1 if action returns non-nil error
- ➕ Added support for TOML to the
altsrc
loader SkipArgReorder
was added to allow users to skip the argument reordering.
This is useful if you want to consider all "flags" after an argument as
0️⃣ arguments rather than flags (the default behavior of the stdlibflag
library). This is backported functionality from the removal of the flag
🚀 reordering in the unreleased version
2- For formatted errors (those implementing
ErrorFormatter
), the errors will
be formatted during output. Compatible withpkg/errors
.
🔄 Changed
- ✅ Raise minimum tested/supported Go version to 1.2+
🛠 Fixed
- Consider empty environment variables as set (previously environment variables
with the equivalent of""
would be skipped rather than their value used). - 📜 Return an error if the value in a given environment variable cannot be parsed
as the flag type. Previously these errors were silently swallowed. - 🖨 Print full error when an invalid flag is specified (which includes the invalid flag)
- 0️⃣
App.Writer
defaults tostdout
whennil
- 🖨 If no action is specified on a command or app, the help is now printed instead of
panic
ing - 📇
App.Metadata
is initialized automatically now (previously wasnil
unless initialized) - Correctly show help message if
-h
is provided to a subcommand context.(Global)IsSet
now respects environment variables. Previously it
would returnfalse
if a flag was specified in the environment rather than
as an argument- ✂ Removed deprecation warnings to STDERR to avoid them leaking to the end-user
- ⚡️
altsrc
s import paths were updated to usegopkg.in/urfave/cli.v1
. This
🛠 fixes issues that occurred whengopkg.in/urfave/cli.v1
was imported as well
asaltsrc
where Go would complain that the types didn't match