Rebase origin
This commit is contained in:
parent
2047c6630c
commit
adcce134f3
11
command.go
11
command.go
@ -406,17 +406,6 @@ func (c *Command) VisibleFlagCategories() []VisibleFlagCategory {
|
|||||||
return c.flagCategories.VisibleCategories()
|
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
|
// VisibleFlags returns a slice of the Flags with Hidden=false
|
||||||
func (c *Command) VisibleFlags() []Flag {
|
func (c *Command) VisibleFlags() []Flag {
|
||||||
return visibleFlags(c.Flags)
|
return visibleFlags(c.Flags)
|
||||||
|
@ -549,6 +549,7 @@ type Command struct {
|
|||||||
// cli.go uses text/template to render templates. You can
|
// cli.go uses text/template to render templates. You can
|
||||||
// render custom help text by setting this variable.
|
// render custom help text by setting this variable.
|
||||||
CustomHelpTemplate string
|
CustomHelpTemplate string
|
||||||
|
|
||||||
// Has unexported fields.
|
// Has unexported fields.
|
||||||
}
|
}
|
||||||
Command is a subcommand for a cli.App.
|
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) 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
|
func (c *Command) VisibleCommands() []*Command
|
||||||
VisibleCommands returns a slice of the Commands with Hidden=false
|
VisibleCommands returns a slice of the Commands with Hidden=false
|
||||||
|
|
||||||
|
5
testdata/godoc-v2.x.txt
vendored
5
testdata/godoc-v2.x.txt
vendored
@ -549,6 +549,7 @@ type Command struct {
|
|||||||
// cli.go uses text/template to render templates. You can
|
// cli.go uses text/template to render templates. You can
|
||||||
// render custom help text by setting this variable.
|
// render custom help text by setting this variable.
|
||||||
CustomHelpTemplate string
|
CustomHelpTemplate string
|
||||||
|
|
||||||
// Has unexported fields.
|
// Has unexported fields.
|
||||||
}
|
}
|
||||||
Command is a subcommand for a cli.App.
|
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) 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
|
func (c *Command) VisibleCommands() []*Command
|
||||||
VisibleCommands returns a slice of the Commands with Hidden=false
|
VisibleCommands returns a slice of the Commands with Hidden=false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user