Accept current godoc for v2
This commit is contained in:
parent
cb040b67a0
commit
d4a5c397f4
@ -458,6 +458,8 @@ type BoolFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Count *int
|
Count *int
|
||||||
|
|
||||||
|
Action func(*Context, bool) error
|
||||||
}
|
}
|
||||||
BoolFlag is a flag with type bool
|
BoolFlag is a flag with type bool
|
||||||
|
|
||||||
@ -565,7 +567,6 @@ 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.
|
||||||
@ -584,13 +585,6 @@ func (c *Command) Run(ctx *Context) (err error)
|
|||||||
Run invokes the command given the context, parses ctx.Args() to generate
|
Run invokes the command given the context, parses ctx.Args() to generate
|
||||||
command-specific flags
|
command-specific flags
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
||||||
VisibleFlagCategories returns a slice containing all the visible flag
|
VisibleFlagCategories returns a slice containing all the visible flag
|
||||||
categories with the flags they contain
|
categories with the flags they contain
|
||||||
@ -776,6 +770,8 @@ type DurationFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, time.Duration) error
|
||||||
}
|
}
|
||||||
DurationFlag is a flag with type time.Duration
|
DurationFlag is a flag with type time.Duration
|
||||||
|
|
||||||
@ -952,6 +948,8 @@ type Float64Flag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, float64) error
|
||||||
}
|
}
|
||||||
Float64Flag is a flag with type float64
|
Float64Flag is a flag with type float64
|
||||||
|
|
||||||
@ -1038,6 +1036,8 @@ type Float64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []float64) error
|
||||||
}
|
}
|
||||||
Float64SliceFlag is a flag with type *Float64Slice
|
Float64SliceFlag is a flag with type *Float64Slice
|
||||||
|
|
||||||
@ -1115,6 +1115,8 @@ type GenericFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, interface{}) error
|
||||||
}
|
}
|
||||||
GenericFlag is a flag with type Generic
|
GenericFlag is a flag with type Generic
|
||||||
|
|
||||||
@ -1181,6 +1183,8 @@ type Int64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int64) error
|
||||||
}
|
}
|
||||||
Int64Flag is a flag with type int64
|
Int64Flag is a flag with type int64
|
||||||
|
|
||||||
@ -1267,6 +1271,8 @@ type Int64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int64) error
|
||||||
}
|
}
|
||||||
Int64SliceFlag is a flag with type *Int64Slice
|
Int64SliceFlag is a flag with type *Int64Slice
|
||||||
|
|
||||||
@ -1338,6 +1344,8 @@ type IntFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int) error
|
||||||
}
|
}
|
||||||
IntFlag is a flag with type int
|
IntFlag is a flag with type int
|
||||||
|
|
||||||
@ -1428,6 +1436,8 @@ type IntSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int) error
|
||||||
}
|
}
|
||||||
IntSliceFlag is a flag with type *IntSlice
|
IntSliceFlag is a flag with type *IntSlice
|
||||||
|
|
||||||
@ -1533,6 +1543,8 @@ type PathFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, Path) error
|
||||||
}
|
}
|
||||||
PathFlag is a flag with type Path
|
PathFlag is a flag with type Path
|
||||||
|
|
||||||
@ -1673,6 +1685,8 @@ type StringFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, string) error
|
||||||
}
|
}
|
||||||
StringFlag is a flag with type string
|
StringFlag is a flag with type string
|
||||||
|
|
||||||
@ -1761,6 +1775,8 @@ type StringSliceFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, []string) error
|
||||||
}
|
}
|
||||||
StringSliceFlag is a flag with type *StringSlice
|
StringSliceFlag is a flag with type *StringSlice
|
||||||
|
|
||||||
@ -1867,6 +1883,8 @@ type TimestampFlag struct {
|
|||||||
Layout string
|
Layout string
|
||||||
|
|
||||||
Timezone *time.Location
|
Timezone *time.Location
|
||||||
|
|
||||||
|
Action func(*Context, *time.Time) error
|
||||||
}
|
}
|
||||||
TimestampFlag is a flag with type *Timestamp
|
TimestampFlag is a flag with type *Timestamp
|
||||||
|
|
||||||
@ -1932,6 +1950,8 @@ type Uint64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint64) error
|
||||||
}
|
}
|
||||||
Uint64Flag is a flag with type uint64
|
Uint64Flag is a flag with type uint64
|
||||||
|
|
||||||
@ -2018,6 +2038,8 @@ type Uint64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint64) error
|
||||||
}
|
}
|
||||||
Uint64SliceFlag is a flag with type *Uint64Slice
|
Uint64SliceFlag is a flag with type *Uint64Slice
|
||||||
|
|
||||||
@ -2080,6 +2102,8 @@ type UintFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint) error
|
||||||
}
|
}
|
||||||
UintFlag is a flag with type uint
|
UintFlag is a flag with type uint
|
||||||
|
|
||||||
@ -2170,6 +2194,8 @@ type UintSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint) error
|
||||||
}
|
}
|
||||||
UintSliceFlag is a flag with type *UintSlice
|
UintSliceFlag is a flag with type *UintSlice
|
||||||
|
|
||||||
|
42
testdata/godoc-v2.x.txt
vendored
42
testdata/godoc-v2.x.txt
vendored
@ -458,6 +458,8 @@ type BoolFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Count *int
|
Count *int
|
||||||
|
|
||||||
|
Action func(*Context, bool) error
|
||||||
}
|
}
|
||||||
BoolFlag is a flag with type bool
|
BoolFlag is a flag with type bool
|
||||||
|
|
||||||
@ -565,7 +567,6 @@ 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.
|
||||||
@ -584,13 +585,6 @@ func (c *Command) Run(ctx *Context) (err error)
|
|||||||
Run invokes the command given the context, parses ctx.Args() to generate
|
Run invokes the command given the context, parses ctx.Args() to generate
|
||||||
command-specific flags
|
command-specific flags
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
|
||||||
VisibleFlagCategories returns a slice containing all the visible flag
|
VisibleFlagCategories returns a slice containing all the visible flag
|
||||||
categories with the flags they contain
|
categories with the flags they contain
|
||||||
@ -776,6 +770,8 @@ type DurationFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, time.Duration) error
|
||||||
}
|
}
|
||||||
DurationFlag is a flag with type time.Duration
|
DurationFlag is a flag with type time.Duration
|
||||||
|
|
||||||
@ -952,6 +948,8 @@ type Float64Flag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, float64) error
|
||||||
}
|
}
|
||||||
Float64Flag is a flag with type float64
|
Float64Flag is a flag with type float64
|
||||||
|
|
||||||
@ -1038,6 +1036,8 @@ type Float64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []float64) error
|
||||||
}
|
}
|
||||||
Float64SliceFlag is a flag with type *Float64Slice
|
Float64SliceFlag is a flag with type *Float64Slice
|
||||||
|
|
||||||
@ -1115,6 +1115,8 @@ type GenericFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, interface{}) error
|
||||||
}
|
}
|
||||||
GenericFlag is a flag with type Generic
|
GenericFlag is a flag with type Generic
|
||||||
|
|
||||||
@ -1181,6 +1183,8 @@ type Int64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int64) error
|
||||||
}
|
}
|
||||||
Int64Flag is a flag with type int64
|
Int64Flag is a flag with type int64
|
||||||
|
|
||||||
@ -1267,6 +1271,8 @@ type Int64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int64) error
|
||||||
}
|
}
|
||||||
Int64SliceFlag is a flag with type *Int64Slice
|
Int64SliceFlag is a flag with type *Int64Slice
|
||||||
|
|
||||||
@ -1338,6 +1344,8 @@ type IntFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int) error
|
||||||
}
|
}
|
||||||
IntFlag is a flag with type int
|
IntFlag is a flag with type int
|
||||||
|
|
||||||
@ -1428,6 +1436,8 @@ type IntSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int) error
|
||||||
}
|
}
|
||||||
IntSliceFlag is a flag with type *IntSlice
|
IntSliceFlag is a flag with type *IntSlice
|
||||||
|
|
||||||
@ -1533,6 +1543,8 @@ type PathFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, Path) error
|
||||||
}
|
}
|
||||||
PathFlag is a flag with type Path
|
PathFlag is a flag with type Path
|
||||||
|
|
||||||
@ -1673,6 +1685,8 @@ type StringFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, string) error
|
||||||
}
|
}
|
||||||
StringFlag is a flag with type string
|
StringFlag is a flag with type string
|
||||||
|
|
||||||
@ -1761,6 +1775,8 @@ type StringSliceFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, []string) error
|
||||||
}
|
}
|
||||||
StringSliceFlag is a flag with type *StringSlice
|
StringSliceFlag is a flag with type *StringSlice
|
||||||
|
|
||||||
@ -1867,6 +1883,8 @@ type TimestampFlag struct {
|
|||||||
Layout string
|
Layout string
|
||||||
|
|
||||||
Timezone *time.Location
|
Timezone *time.Location
|
||||||
|
|
||||||
|
Action func(*Context, *time.Time) error
|
||||||
}
|
}
|
||||||
TimestampFlag is a flag with type *Timestamp
|
TimestampFlag is a flag with type *Timestamp
|
||||||
|
|
||||||
@ -1932,6 +1950,8 @@ type Uint64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint64) error
|
||||||
}
|
}
|
||||||
Uint64Flag is a flag with type uint64
|
Uint64Flag is a flag with type uint64
|
||||||
|
|
||||||
@ -2018,6 +2038,8 @@ type Uint64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint64) error
|
||||||
}
|
}
|
||||||
Uint64SliceFlag is a flag with type *Uint64Slice
|
Uint64SliceFlag is a flag with type *Uint64Slice
|
||||||
|
|
||||||
@ -2080,6 +2102,8 @@ type UintFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint) error
|
||||||
}
|
}
|
||||||
UintFlag is a flag with type uint
|
UintFlag is a flag with type uint
|
||||||
|
|
||||||
@ -2170,6 +2194,8 @@ type UintSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint) error
|
||||||
}
|
}
|
||||||
UintSliceFlag is a flag with type *UintSlice
|
UintSliceFlag is a flag with type *UintSlice
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user