|
|
@ -45,11 +45,16 @@ AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
|
|
|
|
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
|
|
|
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
|
|
|
|
{{.Name}}:{{range .VisibleCommands}}
|
|
|
|
{{.Name}}:{{range .VisibleCommands}}
|
|
|
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
|
|
|
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
|
|
|
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
|
|
|
|
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlagCategories}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL OPTIONS:{{range .VisibleFlagCategories}}
|
|
|
|
|
|
|
|
{{if .Name}}{{.Name}}
|
|
|
|
|
|
|
|
{{end}}{{range .Flags}}{{.}}
|
|
|
|
|
|
|
|
{{end}}{{end}}{{else}}{{if .VisibleFlags}}
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL OPTIONS:
|
|
|
|
GLOBAL OPTIONS:
|
|
|
|
{{range $index, $option := .VisibleFlags}}{{if $index}}
|
|
|
|
{{range $index, $option := .VisibleFlags}}{{if $index}}
|
|
|
|
{{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}
|
|
|
|
{{end}}{{$option}}{{end}}{{end}}{{end}}{{if .Copyright}}
|
|
|
|
|
|
|
|
|
|
|
|
COPYRIGHT:
|
|
|
|
COPYRIGHT:
|
|
|
|
{{.Copyright}}{{end}}
|
|
|
|
{{.Copyright}}{{end}}
|
|
|
@ -68,11 +73,16 @@ CATEGORY:
|
|
|
|
{{.Category}}{{end}}{{if .Description}}
|
|
|
|
{{.Category}}{{end}}{{if .Description}}
|
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION:
|
|
|
|
DESCRIPTION:
|
|
|
|
{{.Description | nindent 3 | trim}}{{end}}{{if .VisibleFlags}}
|
|
|
|
{{.Description | nindent 3 | trim}}{{end}}{{if .VisibleFlagCategories}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONS:{{range .VisibleFlagCategories}}
|
|
|
|
|
|
|
|
{{if .Name}}{{.Name}}
|
|
|
|
|
|
|
|
{{end}}{{range .Flags}}{{.}}
|
|
|
|
|
|
|
|
{{end}}{{end}}{{else}}{{if .VisibleFlags}}
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONS:
|
|
|
|
OPTIONS:
|
|
|
|
{{range .VisibleFlags}}{{.}}
|
|
|
|
{{range .VisibleFlags}}{{.}}
|
|
|
|
{{end}}{{end}}
|
|
|
|
{{end}}{{end}}{{end}}
|
|
|
|
`
|
|
|
|
`
|
|
|
|
CommandHelpTemplate is the text template for the command help topic. cli.go
|
|
|
|
CommandHelpTemplate is the text template for the command help topic. cli.go
|
|
|
|
uses text/template to render templates. You can render custom help text by
|
|
|
|
uses text/template to render templates. You can render custom help text by
|
|
|
@ -369,6 +379,10 @@ func (a *App) VisibleCategories() []CommandCategory
|
|
|
|
func (a *App) VisibleCommands() []*Command
|
|
|
|
func (a *App) VisibleCommands() []*Command
|
|
|
|
VisibleCommands returns a slice of the Commands with Hidden=false
|
|
|
|
VisibleCommands returns a slice of the Commands with Hidden=false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (a *App) VisibleFlagCategories() []VisibleFlagCategory
|
|
|
|
|
|
|
|
VisibleFlagCategories returns a slice containing all the categories with the
|
|
|
|
|
|
|
|
flags they contain
|
|
|
|
|
|
|
|
|
|
|
|
func (a *App) VisibleFlags() []Flag
|
|
|
|
func (a *App) VisibleFlags() []Flag
|
|
|
|
VisibleFlags returns a slice of the Flags with Hidden=false
|
|
|
|
VisibleFlags returns a slice of the Flags with Hidden=false
|
|
|
|
|
|
|
|
|
|
|
@ -409,6 +423,7 @@ type BeforeFunc func(*Context) error
|
|
|
|
type BoolFlag struct {
|
|
|
|
type BoolFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -431,6 +446,9 @@ func (f *BoolFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *BoolFlag) Get(ctx *Context) bool
|
|
|
|
func (f *BoolFlag) Get(ctx *Context) bool
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *BoolFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *BoolFlag) GetDefaultText() string
|
|
|
|
func (f *BoolFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -462,6 +480,14 @@ func (f *BoolFlag) String() string
|
|
|
|
func (f *BoolFlag) TakesValue() bool
|
|
|
|
func (f *BoolFlag) TakesValue() bool
|
|
|
|
TakesValue returns true of the flag takes a value, otherwise false
|
|
|
|
TakesValue returns true of the flag takes a value, otherwise false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type CategorizableFlag interface {
|
|
|
|
|
|
|
|
VisibleFlag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetCategory() string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
CategorizableFlag is an interface that allows us to potentially use a flag
|
|
|
|
|
|
|
|
in a categorized representation.
|
|
|
|
|
|
|
|
|
|
|
|
type Command struct {
|
|
|
|
type Command struct {
|
|
|
|
// The name of the command
|
|
|
|
// The name of the command
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
@ -493,6 +519,7 @@ type Command struct {
|
|
|
|
Subcommands []*Command
|
|
|
|
Subcommands []*Command
|
|
|
|
// List of flags to parse
|
|
|
|
// List of flags to parse
|
|
|
|
Flags []Flag
|
|
|
|
Flags []Flag
|
|
|
|
|
|
|
|
|
|
|
|
// Treat all flags as normal arguments if true
|
|
|
|
// Treat all flags as normal arguments if true
|
|
|
|
SkipFlagParsing bool
|
|
|
|
SkipFlagParsing bool
|
|
|
|
// Boolean to hide built-in help command and help flag
|
|
|
|
// Boolean to hide built-in help command and help flag
|
|
|
@ -532,13 +559,17 @@ 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) VisibleFlagCategories() []VisibleFlagCategory
|
|
|
|
|
|
|
|
VisibleFlagCategories returns a slice containing all the visible flag
|
|
|
|
|
|
|
|
categories with the flags they contain
|
|
|
|
|
|
|
|
|
|
|
|
func (c *Command) VisibleFlags() []Flag
|
|
|
|
func (c *Command) VisibleFlags() []Flag
|
|
|
|
VisibleFlags returns a slice of the Flags with Hidden=false
|
|
|
|
VisibleFlags returns a slice of the Flags with Hidden=false
|
|
|
|
|
|
|
|
|
|
|
|
type CommandCategories interface {
|
|
|
|
type CommandCategories interface {
|
|
|
|
// AddCommand adds a command to a category, creating a new category if necessary.
|
|
|
|
// AddCommand adds a command to a category, creating a new category if necessary.
|
|
|
|
AddCommand(category string, command *Command)
|
|
|
|
AddCommand(category string, command *Command)
|
|
|
|
// categories returns a copy of the category slice
|
|
|
|
// Categories returns a slice of categories sorted by name
|
|
|
|
Categories() []CommandCategory
|
|
|
|
Categories() []CommandCategory
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CommandCategories interface allows for category manipulation
|
|
|
|
CommandCategories interface allows for category manipulation
|
|
|
@ -682,6 +713,7 @@ type DocGenerationFlag interface {
|
|
|
|
type DurationFlag struct {
|
|
|
|
type DurationFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -704,6 +736,9 @@ func (f *DurationFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *DurationFlag) Get(ctx *Context) time.Duration
|
|
|
|
func (f *DurationFlag) Get(ctx *Context) time.Duration
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *DurationFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *DurationFlag) GetDefaultText() string
|
|
|
|
func (f *DurationFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -799,6 +834,14 @@ var VersionFlag Flag = &BoolFlag{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VersionFlag prints the version for the application
|
|
|
|
VersionFlag prints the version for the application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type FlagCategories interface {
|
|
|
|
|
|
|
|
// AddFlags adds a flag to a category, creating a new category if necessary.
|
|
|
|
|
|
|
|
AddFlag(category string, fl Flag)
|
|
|
|
|
|
|
|
// VisibleCategories returns a slice of visible flag categories sorted by name
|
|
|
|
|
|
|
|
VisibleCategories() []VisibleFlagCategory
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
FlagCategories interface allows for category manipulation
|
|
|
|
|
|
|
|
|
|
|
|
type FlagEnvHintFunc func(envVars []string, str string) string
|
|
|
|
type FlagEnvHintFunc func(envVars []string, str string) string
|
|
|
|
FlagEnvHintFunc is used by the default FlagStringFunc to annotate flag help
|
|
|
|
FlagEnvHintFunc is used by the default FlagStringFunc to annotate flag help
|
|
|
|
with the environment variable details.
|
|
|
|
with the environment variable details.
|
|
|
@ -843,6 +886,7 @@ func (f FlagsByName) Swap(i, j int)
|
|
|
|
type Float64Flag struct {
|
|
|
|
type Float64Flag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -865,6 +909,9 @@ func (f *Float64Flag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *Float64Flag) Get(ctx *Context) float64
|
|
|
|
func (f *Float64Flag) Get(ctx *Context) float64
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Float64Flag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Float64Flag) GetDefaultText() string
|
|
|
|
func (f *Float64Flag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -922,6 +969,7 @@ func (f *Float64Slice) Value() []float64
|
|
|
|
type Float64SliceFlag struct {
|
|
|
|
type Float64SliceFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -944,6 +992,9 @@ func (f *Float64SliceFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *Float64SliceFlag) Get(ctx *Context) []float64
|
|
|
|
func (f *Float64SliceFlag) Get(ctx *Context) []float64
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Float64SliceFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Float64SliceFlag) GetDefaultText() string
|
|
|
|
func (f *Float64SliceFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -984,6 +1035,7 @@ type Generic interface {
|
|
|
|
type GenericFlag struct {
|
|
|
|
type GenericFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1009,6 +1061,9 @@ func (f GenericFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *GenericFlag) Get(ctx *Context) interface{}
|
|
|
|
func (f *GenericFlag) Get(ctx *Context) interface{}
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *GenericFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *GenericFlag) GetDefaultText() string
|
|
|
|
func (f *GenericFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1043,6 +1098,7 @@ func (f *GenericFlag) TakesValue() bool
|
|
|
|
type Int64Flag struct {
|
|
|
|
type Int64Flag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1065,6 +1121,9 @@ func (f *Int64Flag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *Int64Flag) Get(ctx *Context) int64
|
|
|
|
func (f *Int64Flag) Get(ctx *Context) int64
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64Flag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64Flag) GetDefaultText() string
|
|
|
|
func (f *Int64Flag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1122,6 +1181,7 @@ func (i *Int64Slice) Value() []int64
|
|
|
|
type Int64SliceFlag struct {
|
|
|
|
type Int64SliceFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1144,13 +1204,16 @@ func (f *Int64SliceFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *Int64SliceFlag) Get(ctx *Context) []int64
|
|
|
|
func (f *Int64SliceFlag) Get(ctx *Context) []int64
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64SliceFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64SliceFlag) GetDefaultText() string
|
|
|
|
func (f *Int64SliceFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64SliceFlag) GetEnvVars() []string
|
|
|
|
func (f *Int64SliceFlag) GetEnvVars() []string
|
|
|
|
GetEnvVars returns the env vars for this flag
|
|
|
|
GetEnvVars returns the env vars for this flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f Int64SliceFlag) GetUsage() string
|
|
|
|
func (f *Int64SliceFlag) GetUsage() string
|
|
|
|
GetUsage returns the usage string for the flag
|
|
|
|
GetUsage returns the usage string for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Int64SliceFlag) GetValue() string
|
|
|
|
func (f *Int64SliceFlag) GetValue() string
|
|
|
@ -1178,6 +1241,7 @@ func (f *Int64SliceFlag) TakesValue() bool
|
|
|
|
type IntFlag struct {
|
|
|
|
type IntFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1200,6 +1264,9 @@ func (f *IntFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *IntFlag) Get(ctx *Context) int
|
|
|
|
func (f *IntFlag) Get(ctx *Context) int
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntFlag) GetDefaultText() string
|
|
|
|
func (f *IntFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1261,6 +1328,7 @@ func (i *IntSlice) Value() []int
|
|
|
|
type IntSliceFlag struct {
|
|
|
|
type IntSliceFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1283,13 +1351,16 @@ func (f *IntSliceFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *IntSliceFlag) Get(ctx *Context) []int
|
|
|
|
func (f *IntSliceFlag) Get(ctx *Context) []int
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntSliceFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntSliceFlag) GetDefaultText() string
|
|
|
|
func (f *IntSliceFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntSliceFlag) GetEnvVars() []string
|
|
|
|
func (f *IntSliceFlag) GetEnvVars() []string
|
|
|
|
GetEnvVars returns the env vars for this flag
|
|
|
|
GetEnvVars returns the env vars for this flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f IntSliceFlag) GetUsage() string
|
|
|
|
func (f *IntSliceFlag) GetUsage() string
|
|
|
|
GetUsage returns the usage string for the flag
|
|
|
|
GetUsage returns the usage string for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *IntSliceFlag) GetValue() string
|
|
|
|
func (f *IntSliceFlag) GetValue() string
|
|
|
@ -1331,6 +1402,7 @@ type Path = string
|
|
|
|
type PathFlag struct {
|
|
|
|
type PathFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1355,6 +1427,9 @@ func (f *PathFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *PathFlag) Get(ctx *Context) string
|
|
|
|
func (f *PathFlag) Get(ctx *Context) string
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *PathFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *PathFlag) GetDefaultText() string
|
|
|
|
func (f *PathFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1403,6 +1478,7 @@ type Serializer interface {
|
|
|
|
type StringFlag struct {
|
|
|
|
type StringFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1427,6 +1503,9 @@ func (f *StringFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *StringFlag) Get(ctx *Context) string
|
|
|
|
func (f *StringFlag) Get(ctx *Context) string
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *StringFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *StringFlag) GetDefaultText() string
|
|
|
|
func (f *StringFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1484,6 +1563,7 @@ func (s *StringSlice) Value() []string
|
|
|
|
type StringSliceFlag struct {
|
|
|
|
type StringSliceFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1508,6 +1588,9 @@ func (f *StringSliceFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *StringSliceFlag) Get(ctx *Context) []string
|
|
|
|
func (f *StringSliceFlag) Get(ctx *Context) []string
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *StringSliceFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *StringSliceFlag) GetDefaultText() string
|
|
|
|
func (f *StringSliceFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1568,6 +1651,7 @@ func (t *Timestamp) Value() *time.Time
|
|
|
|
type TimestampFlag struct {
|
|
|
|
type TimestampFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1592,6 +1676,9 @@ func (f *TimestampFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *TimestampFlag) Get(ctx *Context) *time.Time
|
|
|
|
func (f *TimestampFlag) Get(ctx *Context) *time.Time
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *TimestampFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *TimestampFlag) GetDefaultText() string
|
|
|
|
func (f *TimestampFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1626,6 +1713,7 @@ func (f *TimestampFlag) TakesValue() bool
|
|
|
|
type Uint64Flag struct {
|
|
|
|
type Uint64Flag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1648,6 +1736,9 @@ func (f *Uint64Flag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *Uint64Flag) Get(ctx *Context) uint64
|
|
|
|
func (f *Uint64Flag) Get(ctx *Context) uint64
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Uint64Flag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *Uint64Flag) GetDefaultText() string
|
|
|
|
func (f *Uint64Flag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1682,6 +1773,7 @@ func (f *Uint64Flag) TakesValue() bool
|
|
|
|
type UintFlag struct {
|
|
|
|
type UintFlag struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Category string
|
|
|
|
DefaultText string
|
|
|
|
DefaultText string
|
|
|
|
FilePath string
|
|
|
|
FilePath string
|
|
|
|
Usage string
|
|
|
|
Usage string
|
|
|
@ -1704,6 +1796,9 @@ func (f *UintFlag) Apply(set *flag.FlagSet) error
|
|
|
|
func (f *UintFlag) Get(ctx *Context) uint
|
|
|
|
func (f *UintFlag) Get(ctx *Context) uint
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
Get returns the flag’s value in the given Context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (f *UintFlag) GetCategory() string
|
|
|
|
|
|
|
|
GetCategory returns the category for the flag
|
|
|
|
|
|
|
|
|
|
|
|
func (f *UintFlag) GetDefaultText() string
|
|
|
|
func (f *UintFlag) GetDefaultText() string
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
GetDefaultText returns the default text for this flag
|
|
|
|
|
|
|
|
|
|
|
@ -1743,6 +1838,14 @@ type VisibleFlag interface {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VisibleFlag is an interface that allows to check if a flag is visible
|
|
|
|
VisibleFlag is an interface that allows to check if a flag is visible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type VisibleFlagCategory interface {
|
|
|
|
|
|
|
|
// Name returns the category name string
|
|
|
|
|
|
|
|
Name() string
|
|
|
|
|
|
|
|
// Flags returns a slice of VisibleFlag sorted by name
|
|
|
|
|
|
|
|
Flags() []VisibleFlag
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
VisibleFlagCategory is a category containing flags.
|
|
|
|
|
|
|
|
|
|
|
|
package altsrc // import "github.com/urfave/cli/v2/altsrc"
|
|
|
|
package altsrc // import "github.com/urfave/cli/v2/altsrc"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|