From d6395333f1a730ab61b35cc59f4c1d16eb96a585 Mon Sep 17 00:00:00 2001 From: Naveen Gogineni Date: Wed, 21 Sep 2022 18:24:03 -0400 Subject: [PATCH] Remove un-needed func --- app.go | 1 - command.go | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/app.go b/app.go index 93ceba8f6c..2ffacd512c 100644 --- a/app.go +++ b/app.go @@ -133,7 +133,6 @@ func compileTime() time.Time { func NewApp() *App { return &App{ Name: filepath.Base(os.Args[0]), - HelpName: "", // setup will fill this later Usage: "A new cli application", UsageText: "", BashComplete: DefaultAppComplete, diff --git a/command.go b/command.go index 7213fd7fac..1ead6e9ef0 100644 --- a/command.go +++ b/command.go @@ -62,9 +62,6 @@ type Command struct { // cli.go uses text/template to render templates. You can // render custom help text by setting this variable. CustomHelpTemplate string - - // categories contains the categorized commands and is populated on app startup - categories CommandCategories } type Commands []*Command @@ -312,17 +309,6 @@ func (c *Command) VisibleFlags() []Flag { return visibleFlags(c.Flags) } -// VisibleCommands returns a slice of the Commands with Hidden=false -func (c *Command) VisibleCommands() []*Command { - var ret []*Command - for _, command := range c.Subcommands { - if !command.Hidden { - ret = append(ret, command) - } - } - return ret -} - func (c *Command) appendFlag(fl Flag) { if !hasFlag(c.Flags, fl) { c.Flags = append(c.Flags, fl)