Set destination in GenericFlag apply function

The function was missing destination configuration.
This commit is contained in:
Jakub Nowakowski
2022-10-09 09:57:25 -04:00
committed by meatballhat
parent c5057d195e
commit 01bdec784f
+4
View File
@@ -34,6 +34,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)
}