Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Sep 25, 2022
1 parent 9ab2d31 commit 6febf55
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions testdata/godoc-v2.x.txt
Expand Up @@ -148,7 +148,7 @@ var SubcommandHelpTemplate = `NAME:
{{.HelpName}} - {{.Usage}}

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:
{{wrap .Description 3}}{{end}}
Expand Down Expand Up @@ -361,10 +361,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 @@ -458,6 +454,8 @@ type BoolFlag struct {
EnvVars []string

Count *int

Action func(*Context, bool) error
}
BoolFlag is a flag with type bool

Expand Down Expand Up @@ -570,6 +568,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 @@ -580,9 +580,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) VisibleCategories() []CommandCategory
VisibleCategories returns a slice of categories and commands that are
Expand Down Expand Up @@ -776,6 +774,8 @@ type DurationFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, time.Duration) error
}
DurationFlag is a flag with type time.Duration

Expand Down Expand Up @@ -952,6 +952,8 @@ type Float64Flag struct {

Aliases []string
EnvVars []string

Action func(*Context, float64) error
}
Float64Flag is a flag with type float64

Expand Down Expand Up @@ -1038,6 +1040,8 @@ type Float64SliceFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, []float64) error
}
Float64SliceFlag is a flag with type *Float64Slice

Expand Down Expand Up @@ -1115,6 +1119,8 @@ type GenericFlag struct {
EnvVars []string

TakesFile bool

Action func(*Context, interface{}) error
}
GenericFlag is a flag with type Generic

Expand Down Expand Up @@ -1181,6 +1187,8 @@ type Int64Flag struct {
EnvVars []string

Base int

Action func(*Context, int64) error
}
Int64Flag is a flag with type int64

Expand Down Expand Up @@ -1267,6 +1275,8 @@ type Int64SliceFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, []int64) error
}
Int64SliceFlag is a flag with type *Int64Slice

Expand Down Expand Up @@ -1338,6 +1348,8 @@ type IntFlag struct {
EnvVars []string

Base int

Action func(*Context, int) error
}
IntFlag is a flag with type int

Expand Down Expand Up @@ -1428,6 +1440,8 @@ type IntSliceFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, []int) error
}
IntSliceFlag is a flag with type *IntSlice

Expand Down Expand Up @@ -1533,6 +1547,8 @@ type PathFlag struct {
EnvVars []string

TakesFile bool

Action func(*Context, Path) error
}
PathFlag is a flag with type Path

Expand Down Expand Up @@ -1673,6 +1689,8 @@ type StringFlag struct {
EnvVars []string

TakesFile bool

Action func(*Context, string) error
}
StringFlag is a flag with type string

Expand Down Expand Up @@ -1761,6 +1779,8 @@ type StringSliceFlag struct {
EnvVars []string

TakesFile bool

Action func(*Context, []string) error
}
StringSliceFlag is a flag with type *StringSlice

Expand Down Expand Up @@ -1867,6 +1887,8 @@ type TimestampFlag struct {
Layout string

Timezone *time.Location

Action func(*Context, *time.Time) error
}
TimestampFlag is a flag with type *Timestamp

Expand Down Expand Up @@ -1932,6 +1954,8 @@ type Uint64Flag struct {
EnvVars []string

Base int

Action func(*Context, uint64) error
}
Uint64Flag is a flag with type uint64

Expand Down Expand Up @@ -2018,6 +2042,8 @@ type Uint64SliceFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, []uint64) error
}
Uint64SliceFlag is a flag with type *Uint64Slice

Expand Down Expand Up @@ -2080,6 +2106,8 @@ type UintFlag struct {
EnvVars []string

Base int

Action func(*Context, uint) error
}
UintFlag is a flag with type uint

Expand Down Expand Up @@ -2170,6 +2198,8 @@ type UintSliceFlag struct {

Aliases []string
EnvVars []string

Action func(*Context, []uint) error
}
UintSliceFlag is a flag with type *UintSlice

Expand Down

0 comments on commit 6febf55

Please sign in to comment.