This commit is contained in:
Kevin Barbour 2025-03-11 11:49:53 -04:00 committed by GitHub
commit 7baad3c4ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,6 +150,10 @@ func genFlagResult(flags *pflag.FlagSet) []cmdOption {
var result []cmdOption
flags.VisitAll(func(flag *pflag.Flag) {
if flag.Hidden {
return
}
// Todo, when we mark a shorthand is deprecated, but specify an empty message.
// The flag.ShorthandDeprecated is empty as the shorthand is deprecated.
// Using len(flag.ShorthandDeprecated) > 0 can't handle this, others are ok.