Set destination in GenericFlag apply function

The function was missing destination configuration.
This commit is contained in:
Jakub Nowakowski 2022-07-26 16:16:02 +02:00 committed by Naveen Gogineni
parent 891ffb017b
commit a2541e0fe4

View File

@ -62,6 +62,10 @@ func (f *GenericFlag) Apply(set *flag.FlagSet) error {
}
for _, name := range f.Names() {
if f.Destination != nil {
set.Var(f.Destination, name, f.Usage)
continue
}
set.Var(f.Value, name, f.Usage)
}