From adcce134f3750657d6491d0ef2c882e5d3de5ebc Mon Sep 17 00:00:00 2001 From: Naveen Gogineni Date: Sun, 9 Oct 2022 16:51:42 -0500 Subject: [PATCH] Rebase origin --- command.go | 11 ----------- godoc-current.txt | 5 +++++ testdata/godoc-v2.x.txt | 5 +++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/command.go b/command.go index 7b0b231639..efdf43a77f 100644 --- a/command.go +++ b/command.go @@ -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) diff --git a/godoc-current.txt b/godoc-current.txt index a48aea559c..8532916476 100644 --- a/godoc-current.txt +++ b/godoc-current.txt @@ -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. @@ -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 diff --git a/testdata/godoc-v2.x.txt b/testdata/godoc-v2.x.txt index a48aea559c..8532916476 100644 --- a/testdata/godoc-v2.x.txt +++ b/testdata/godoc-v2.x.txt @@ -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. @@ -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