spf13 / pflag

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
BSD 3-Clause "New" or "Revised" License
2.43k stars 348 forks source link

Fix usage showing zero defaults for custom Value type #361

Open twelvelabs opened 2 years ago

twelvelabs commented 2 years ago

The defaultIsZeroValue() method was erroneously assuming that all types that implement IsBoolFlag() were bools - regardless of the return value of IsBoolFlag().

Fixes #360

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

twelvelabs commented 2 years ago

Not sure who the current maintainers are, so pinging recent last few folks who've approved/merged PRs 😬.

@therealmitchconnors, @eparis, @spf13 - would anyone mind taking a look?