Versions in this module Expand all Collapse all v3 v3.0.0 Mar 7, 2019 Changes in this version + var AppHelpTemplate = ... + var CommandHelpTemplate = ... + var ErrWriter io.Writer = os.Stderr + var GenerateCompletionFlag = &BoolFlag + var HelpFlag = &BoolFlag + var HelpPrinter helpPrinter = printHelp + var InitCompletionFlag = &StringFlag + var OsExiter = os.Exit + var SubcommandHelpTemplate = ... + var VersionFlag = &BoolFlag + var VersionPrinter = printVersion + func DefaultAppComplete(c *Context) + func HandleExitCoder(err error) + func ShowAppHelp(c *Context) error + func ShowCommandCompletions(ctx *Context, command string) + func ShowCommandHelp(ctx *Context, command string) error + func ShowCompletions(c *Context) + func ShowSubcommandHelp(c *Context) error + func ShowVersion(c *Context) + type ActionFunc func(*Context) error + type AfterFunc func(*Context) error + type App struct + Action ActionFunc + After AfterFunc + ArgsUsage string + Authors []*Author + Before BeforeFunc + Categories CommandCategories + CommandNotFound CommandNotFoundFunc + Commands []*Command + Compiled time.Time + Copyright string + Description string + EnableShellCompletion bool + ErrWriter io.Writer + Flags []Flag + HelpName string + HideHelp bool + HideVersion bool + Metadata map[string]interface{} + Name string + OnUsageError OnUsageErrorFunc + ShellComplete ShellCompleteFunc + Usage string + UsageText string + Version string + Writer io.Writer + func (a *App) Command(name string) *Command + func (a *App) Run(arguments []string) (err error) + func (a *App) RunAsSubcommand(ctx *Context) (err error) + func (a *App) Setup() + func (a *App) VisibleCategories() []CommandCategory + func (a *App) VisibleCommands() []*Command + func (a *App) VisibleFlags() []Flag + type Args interface + First func() string + Get func(n int) string + Len func() int + Present func() bool + Slice func() []string + Tail func() []string + type Author struct + Email string + Name string + func (a *Author) String() string + type BeforeFunc func(*Context) error + type BoolFlag struct + Aliases []string + DefaultText string + Destination *bool + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value bool + func (f *BoolFlag) Apply(set *flag.FlagSet) + func (f *BoolFlag) IsRequired() bool + func (f *BoolFlag) IsSetIn(c *Context) bool + func (f *BoolFlag) Names() []string + func (f *BoolFlag) String() string + type Command struct + Action ActionFunc + After AfterFunc + Aliases []string + ArgsUsage string + Before BeforeFunc + Category string + Description string + Flags []Flag + HelpName string + Hidden bool + HideHelp bool + Name string + OnUsageError OnUsageErrorFunc + ShellComplete ShellCompleteFunc + SkipFlagParsing bool + Subcommands []*Command + Usage string + UsageText string + func (c *Command) FullName() string + func (c *Command) HasName(name string) bool + func (c *Command) Names() []string + func (c *Command) Run(ctx *Context) (err error) + func (c *Command) VisibleFlags() []Flag + type CommandCategories interface + AddCommand func(category string, command *Command) + Categories func() []CommandCategory + type CommandCategory interface + Name func() string + VisibleCommands func() []*Command + type CommandNotFoundFunc func(*Context, string) + type Context struct + App *App + Command *Command + func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context + func (c *Context) Args() Args + func (c *Context) Bool(name string) bool + func (c *Context) Duration(name string) time.Duration + func (c *Context) FlagNames() []string + func (c *Context) Float64(name string) float64 + func (c *Context) Float64Slice(name string) []float64 + func (c *Context) Generic(name string) interface{} + func (c *Context) Int(name string) int + func (c *Context) Int64(name string) int64 + func (c *Context) Int64Slice(name string) []int64 + func (c *Context) IntSlice(name string) []int + func (c *Context) IsSet(name string) bool + func (c *Context) Lineage() []*Context + func (c *Context) LocalFlagNames() []string + func (c *Context) NArg() int + func (c *Context) NumFlags() int + func (c *Context) Set(name, value string) error + func (c *Context) String(name string) string + func (c *Context) StringSlice(name string) []string + func (c *Context) Uint(name string) uint + func (c *Context) Uint64(name string) uint64 + type DurationFlag struct + Aliases []string + DefaultText string + Destination *time.Duration + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value time.Duration + func (f *DurationFlag) Apply(set *flag.FlagSet) + func (f *DurationFlag) IsRequired() bool + func (f *DurationFlag) IsSetIn(c *Context) bool + func (f *DurationFlag) Names() []string + func (f *DurationFlag) String() string + type ErrMissingRequired struct + func (e *ErrMissingRequired) Error() string + type ExitCoder interface + ExitCode func() int + func Exit(message string, exitCode int) ExitCoder + type Flag interface + Apply func(*flag.FlagSet) + Names func() []string + type FlagStringFunc func(Flag) string + var FlagStringer FlagStringFunc = stringifyFlag + type FlagsByName []Flag + func (f FlagsByName) Len() int + func (f FlagsByName) Less(i, j int) bool + func (f FlagsByName) Swap(i, j int) + type Float64Flag struct + Aliases []string + DefaultText string + Destination *float64 + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value float64 + func (f *Float64Flag) Apply(set *flag.FlagSet) + func (f *Float64Flag) IsRequired() bool + func (f *Float64Flag) IsSetIn(c *Context) bool + func (f *Float64Flag) Names() []string + func (f *Float64Flag) String() string + type Float64Slice struct + func NewFloat64Slice(defaults ...float64) *Float64Slice + func (f *Float64Slice) Serialized() string + func (f *Float64Slice) Set(value string) error + func (f *Float64Slice) String() string + func (f *Float64Slice) Value() []float64 + type Float64SliceFlag struct + Aliases []string + DefaultText string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value *Float64Slice + func (f *Float64SliceFlag) Apply(set *flag.FlagSet) + func (f *Float64SliceFlag) IsRequired() bool + func (f *Float64SliceFlag) IsSetIn(c *Context) bool + func (f *Float64SliceFlag) Names() []string + func (f *Float64SliceFlag) String() string + type Generic interface + Set func(value string) error + String func() string + type GenericFlag struct + Aliases []string + DefaultText string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value Generic + func (f *GenericFlag) Apply(set *flag.FlagSet) + func (f *GenericFlag) IsRequired() bool + func (f *GenericFlag) IsSetIn(c *Context) bool + func (f *GenericFlag) Names() []string + func (f *GenericFlag) String() string + type Int64Flag struct + Aliases []string + DefaultText string + Destination *int64 + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value int64 + func (f *Int64Flag) Apply(set *flag.FlagSet) + func (f *Int64Flag) IsRequired() bool + func (f *Int64Flag) IsSetIn(c *Context) bool + func (f *Int64Flag) Names() []string + func (f *Int64Flag) String() string + type Int64Slice struct + func NewInt64Slice(defaults ...int64) *Int64Slice + func (f *Int64Slice) Serialized() string + func (f *Int64Slice) Set(value string) error + func (f *Int64Slice) String() string + func (f *Int64Slice) Value() []int64 + type Int64SliceFlag struct + Aliases []string + DefaultText string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value *Int64Slice + func (f *Int64SliceFlag) Apply(set *flag.FlagSet) + func (f *Int64SliceFlag) IsRequired() bool + func (f *Int64SliceFlag) IsSetIn(c *Context) bool + func (f *Int64SliceFlag) Names() []string + func (f *Int64SliceFlag) String() string + type IntFlag struct + Aliases []string + DefaultText string + Destination *int + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value int + func (f *IntFlag) Apply(set *flag.FlagSet) + func (f *IntFlag) IsRequired() bool + func (f *IntFlag) IsSetIn(c *Context) bool + func (f *IntFlag) Names() []string + func (f *IntFlag) String() string + type IntSlice struct + func NewIntSlice(defaults ...int) *IntSlice + func (f *IntSlice) String() string + func (i *IntSlice) Serialized() string + func (i *IntSlice) Set(value string) error + func (i *IntSlice) SetInt(value int) + func (i *IntSlice) Value() []int + type IntSliceFlag struct + Aliases []string + DefaultText string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value *IntSlice + func (f *IntSliceFlag) Apply(set *flag.FlagSet) + func (f *IntSliceFlag) IsRequired() bool + func (f *IntSliceFlag) IsSetIn(c *Context) bool + func (f *IntSliceFlag) Names() []string + func (f *IntSliceFlag) String() string + type IsRequirable interface + IsRequired func() bool + IsSetIn func(*Context) bool + type MultiError interface + Errors func() []error + type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error + type Serializeder interface + Serialized func() string + type ShellCompleteFunc func(*Context) + type StringFlag struct + Aliases []string + DefaultText string + Destination *string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value string + func (f *StringFlag) Apply(set *flag.FlagSet) + func (f *StringFlag) IsRequired() bool + func (f *StringFlag) IsSetIn(c *Context) bool + func (f *StringFlag) Names() []string + func (f *StringFlag) String() string + type StringSlice struct + func NewStringSlice(defaults ...string) *StringSlice + func (f *StringSlice) Serialized() string + func (f *StringSlice) Set(value string) error + func (f *StringSlice) String() string + func (f *StringSlice) Value() []string + type StringSliceFlag struct + Aliases []string + DefaultText string + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value *StringSlice + func (f *StringSliceFlag) Apply(set *flag.FlagSet) + func (f *StringSliceFlag) IsRequired() bool + func (f *StringSliceFlag) IsSetIn(c *Context) bool + func (f *StringSliceFlag) Names() []string + func (f *StringSliceFlag) String() string + type Uint64Flag struct + Aliases []string + DefaultText string + Destination *uint64 + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value uint64 + func (f *Uint64Flag) Apply(set *flag.FlagSet) + func (f *Uint64Flag) IsRequired() bool + func (f *Uint64Flag) IsSetIn(c *Context) bool + func (f *Uint64Flag) Names() []string + func (f *Uint64Flag) String() string + type UintFlag struct + Aliases []string + DefaultText string + Destination *uint + EnvVars []string + Hidden bool + Name string + Required bool + Usage string + Value uint + func (f *UintFlag) Apply(set *flag.FlagSet) + func (f *UintFlag) IsRequired() bool + func (f *UintFlag) IsSetIn(c *Context) bool + func (f *UintFlag) Names() []string + func (f *UintFlag) String() string Other modules containing this package github.com/dkolbly/cli