Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Oct 9, 2022
1 parent 2576c0c commit 00ef229
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions testdata/godoc-v2.x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 00ef229

Please sign in to comment.