main
Naveen Gogineni 2 years ago
parent fa21c74096
commit 2576c0ce4e

@ -136,7 +136,7 @@ var SubcommandHelpTemplate = `NAME:
{{template "helpNameTemplate" .}}
USAGE:
{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}} {{if .VisibleFlags}}command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
DESCRIPTION:
{{template "descriptionTemplate" .}}{{end}}{{if .VisibleCommands}}
@ -347,10 +347,6 @@ func (a *App) RunAndExitOnError()
to cli.App.Run. This will cause the application to exit with the given error
code in the cli.ExitCoder
func (a *App) RunAsSubcommand(ctx *Context) (err error)
RunAsSubcommand invokes the subcommand given the context, parses ctx.Args()
to generate command-specific flags
func (a *App) RunContext(ctx context.Context, arguments []string) (err error)
RunContext is like Run except it takes a Context that will be passed to
its commands and sub-commands. Through this, you can propagate timeouts and
@ -557,6 +553,8 @@ type Command struct {
}
Command is a subcommand for a cli.App.
func (cmd *Command) Command(name string) *Command
func (c *Command) FullName() string
FullName returns the full name of the command. For subcommands this ensures
that parent commands are part of the command path
@ -567,9 +565,7 @@ func (c *Command) HasName(name string) bool
func (c *Command) Names() []string
Names returns the names including short names and aliases.
func (c *Command) Run(ctx *Context) (err error)
Run invokes the command given the context, parses ctx.Args() to generate
command-specific flags
func (c *Command) Run(cCtx *Context, arguments []string) (err error)
func (c *Command) VisibleCommands() []*Command
VisibleCommands returns a slice of the Commands with Hidden=false

Loading…
Cancel
Save