Skip to content

Commit

Permalink
Rebase origin
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Oct 9, 2022
1 parent 2047c66 commit adcce13
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
11 changes: 0 additions & 11 deletions command.go
Expand Up @@ -406,17 +406,6 @@ func (c *Command) VisibleFlagCategories() []VisibleFlagCategory {
return c.flagCategories.VisibleCategories()
}

// 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
}

// VisibleFlags returns a slice of the Flags with Hidden=false
func (c *Command) VisibleFlags() []Flag {
return visibleFlags(c.Flags)
Expand Down
5 changes: 5 additions & 0 deletions godoc-current.txt
Expand Up @@ -549,6 +549,7 @@ type Command struct {
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
CustomHelpTemplate string

// Has unexported fields.
}
Command is a subcommand for a cli.App.
Expand All @@ -567,6 +568,10 @@ func (c *Command) Names() []string

func (c *Command) Run(cCtx *Context, arguments []string) (err error)

func (c *Command) VisibleCategories() []CommandCategory
VisibleCategories returns a slice of categories and commands that are
Hidden=false

func (c *Command) VisibleCommands() []*Command
VisibleCommands returns a slice of the Commands with Hidden=false

Expand Down
5 changes: 5 additions & 0 deletions testdata/godoc-v2.x.txt
Expand Up @@ -549,6 +549,7 @@ type Command struct {
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
CustomHelpTemplate string

// Has unexported fields.
}
Command is a subcommand for a cli.App.
Expand All @@ -567,6 +568,10 @@ func (c *Command) Names() []string

func (c *Command) Run(cCtx *Context, arguments []string) (err error)

func (c *Command) VisibleCategories() []CommandCategory
VisibleCategories returns a slice of categories and commands that are
Hidden=false

func (c *Command) VisibleCommands() []*Command
VisibleCommands returns a slice of the Commands with Hidden=false

Expand Down

0 comments on commit adcce13

Please sign in to comment.