urfave/cli v2.0.0 Release Notes
Release Date: 2019-11-21 // over 4 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