urfave/cli v2.0.0 Release Notes
Release Date: 2019-11-21 // over 2 years ago-
🔀 V2 was merged in #892, which included the work of all of these contributors: @asahasrabuddhe, @meatballhat, @jszwedko, @lynncyrin, @AudriusButkevicius, @saschagrunert, @rliebz, @johnweldon, @nlewo, @grubernaut, @OneOfOne, @VMitov, @cbranch, @marwan-at-work, @uudashr, @bfreis
Discuss the state of V2 here => #826
➕ Added
- ➕ Added
NewStringSlice
andNewIntSlice
for creating their related types - ➕ Added
Float64SliceFlag
for unmarshaling a list of floats from the user - ➕ Added
Context.Lineage
to get all contexts from current up to global - Added
Context.LocalFlagNames
to get the flag names from only the current context - ➕ Added
BoolFlag.Value
to handle both default-false and default-true - ➕ Added
IsSet
method to theFlag
interface which allows us to detect whether or not a flag has been set
🔄 Changed
- Occurrences of
[]Command
have been changed to[]*Command
- Occurrences of
[]cli.Flag
have been changed to[]*cli.Flag
Context.FlagNames
now returns all flags in the context lineageContext.IsSet
now considers the full context lineage
✂ Removed
- ✂ Removed
Global*
flags since all flags are now global- when updating, replace
GlobalBool
withBool
- and
GlobalInt
withInt
- and
GlobalString
withString
- and so on for any other global flags
- when updating, replace
- ✂ Removed
Context.Parent
method, as this is now available viaContext.Lineage
- when updating, replace
Context.Parent()
withContext.Lineage()[1]
- when updating, replace
- ✂ Removed the
App.Author
andApp.Email
- these have been replaced with the
Authors []*Author
field
- these have been replaced with the
- ✂ Removed the
Command.ShortName
field- when updating, replace
ShortName: "i"
withAliases: []string{"i"}
- when updating, replace
- ✂ Removed all
Context.Global*
methods, as the non-global versions now traverse up
the context lineage automatically. - ✂ Removed the ability to specify
&StringSlice{...string}
or&IntSlice{...int}
. - ✂ Removed adapter code for deprecated
Action
func signature - ✂ Removed
BoolTFlag
and related code, as this is now available viaBoolFlag.Value
- ➕ Added