Rework of hidden flag impl plus some Action func corrections

This commit is contained in:
Dan Buch
2016-05-01 08:36:17 -04:00
parent 99431669d0
commit fed78b8bab
7 changed files with 62 additions and 92 deletions
+5
View File
@@ -366,6 +366,11 @@ func (a *App) Categories() CommandCategories {
return a.categories
}
// VisibleFlags returns a slice of the Flags with Hidden=false
func (a *App) VisibleFlags() []Flag {
return visibleFlags(a.Flags)
}
func (a *App) hasFlag(flag Flag) bool {
for _, f := range a.Flags {
if flag == f {