We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8227be1 commit 81f9145Copy full SHA for 81f9145
command.go
@@ -309,14 +309,7 @@ func (c *Command) VisibleCommands() []*Command {
309
// VisibleFlagCategories returns a slice containing all the visible flag categories with the flags they contain
310
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory {
311
if c.flagCategories == nil {
312
- c.flagCategories = newFlagCategories()
313
- for _, fl := range c.Flags {
314
- if cf, ok := fl.(CategorizableFlag); ok {
315
- if cf.GetCategory() != "" {
316
- c.flagCategories.AddFlag(cf.GetCategory(), cf)
317
- }
318
319
+ c.flagCategories = newFlagCategoriesFromFlags(c.Flags)
320
}
321
return c.flagCategories.VisibleCategories()
322
0 commit comments