Skip to content

Commit

Permalink
Remove un-needed func
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Sep 21, 2022
1 parent aecd7c1 commit d639533
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion app.go
Expand Up @@ -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,
Expand Down
14 changes: 0 additions & 14 deletions command.go
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d639533

Please sign in to comment.