Versions in this module Expand all Collapse all v1 v1.0.1 Apr 27, 2026 Changes in this version + var AppHelpTemplate = "" + var AppVersionTemplate = "" + var CommandHelpTemplate = "" + var FlagSplitter = strings.Split + var MapFlagEnvVarSep = "," + var MapFlagKeyValSep = "=" + var SliceFlagEnvVarSep = "," + func LexicographicLess(i, j string) bool + func NewExitError(message interface{}, exitCode int) cli.ExitCoder + func ShowAppHelp(ctx *Context) error + func ShowCommandHelp(ctx *Context, cmdName string) error + func ShowVersion(ctx *Context) error + type ActionFunc func(*Context) error + type ActionableFlag interface + RunAction func(*Context) error + type App struct + Action ActionFunc + After ActionFunc + Author string + Before ActionFunc + Commands Commands + CommonBefore ActionFunc + CustomAppVersionTemplate string + DefaultCommand *Command + Flags Flags + OsExiter func(code int) + func NewApp() *App + func (app *App) AddCommands(cmds ...*Command) + func (app *App) AddFlags(flags ...Flag) + func (app *App) Run(arguments []string) error + func (app *App) VisibleCommands() []*cli.Command + func (app *App) VisibleFlags() Flags + type Args []string + func (args *Args) CommandName() string + func (args *Args) First() string + func (args *Args) Get(n int) string + func (args *Args) Len() int + func (args *Args) Normalize(acts ...NormalizeActsType) *Args + func (args *Args) Present() bool + func (args *Args) Slice() []string + func (args *Args) Tail() []string + type BoolFlag struct + Action ActionFunc + Aliases []string + DefaultText string + Destination *bool + EnvVar string + Name string + Negative bool + Usage string + func (flag *BoolFlag) Apply(set *libflag.FlagSet) error + func (flag *BoolFlag) GetCategory() string + func (flag *BoolFlag) GetDefaultText() string + func (flag *BoolFlag) GetEnvVars() []string + func (flag *BoolFlag) GetUsage() string + func (flag *BoolFlag) GetValue() string + func (flag *BoolFlag) IsSet() bool + func (flag *BoolFlag) LookupEnv(envVar string) *string + func (flag *BoolFlag) Names() []string + func (flag *BoolFlag) RunAction(ctx *Context) error + func (flag *BoolFlag) String() string + func (flag *BoolFlag) TakesValue() bool + func (flag *BoolFlag) Value() FlagValue + type Command struct + Action ActionFunc + After ActionFunc + Aliases []string + Before ActionFunc + CustomHelpTemplate string + Description string + Flags Flags + HelpName string + Hidden bool + IsRoot bool + Name string + SkipFlagParsing bool + SkipRunning bool + Subcommands Commands + Usage string + UsageText string + func (cmd *Command) HasName(name string) bool + func (cmd *Command) Names() []string + func (cmd *Command) Run(ctx *Context, args ...string) (err error) + func (cmd *Command) Subcommand(name string) *Command + func (cmd *Command) VisibleFlags() Flags + func (cmd Command) VisibleSubcommands() []*cli.Command + type Commands []*Command + func (commands *Commands) Add(cmd *Command) + func (commands Commands) Filter(names []string) Commands + func (commands Commands) Get(name string) *Command + func (commands Commands) Len() int + func (commands Commands) Less(i, j int) bool + func (commands Commands) SkipRunning() Commands + func (commands Commands) Swap(i, j int) + func (commands Commands) VisibleCommands() []*cli.Command + type Context struct + Command *Command + func (ctx *Context) Args() *Args + func (ctx *Context) Clone(command *Command, args Args) *Context + func (ctx *Context) Value(key any) any + func (ctx Context) WithValue(key, val any) *Context + type Flag interface + Value func() FlagValue + type FlagType interface + Clone func(dest *T) FlagType[T] + type FlagValue interface + GetDefaultText func() string + IsBoolFlag func() bool + IsSet func() bool + type Flags []Flag + func (flags *Flags) Add(newFlags ...Flag) + func (flags Flags) Filter(names []string) Flags + func (flags Flags) Get(name string) Flag + func (flags Flags) Len() int + func (flags Flags) Less(i, j int) bool + func (flags Flags) RunActions(ctx *Context) error + func (flags Flags) Sort() Flags + func (flags Flags) Swap(i, j int) + func (flags Flags) VisibleFlags() Flags + type GenericFlag struct + Action ActionFunc + Aliases []string + DefaultText string + Destination *T + EnvVar string + Name string + Usage string + func (flag *GenericFlag) GetCategory() string + func (flag *GenericFlag) GetValue() string + func (flag *GenericFlag) IsSet() bool + func (flag *GenericFlag) LookupEnv(envVar string) *string + func (flag *GenericFlag) TakesValue() bool + func (flag *GenericFlag) Value() FlagValue + func (flag *GenericFlag[T]) Apply(set *libflag.FlagSet) error + func (flag *GenericFlag[T]) GetDefaultText() string + func (flag *GenericFlag[T]) GetEnvVars() []string + func (flag *GenericFlag[T]) GetUsage() string + func (flag *GenericFlag[T]) Names() []string + func (flag *GenericFlag[T]) RunAction(ctx *Context) error + func (flag *GenericFlag[T]) String() string + type GenericType interface + type InvalidCommandNameError string + func (cmdName InvalidCommandNameError) Error() string + type InvalidKeyValueError struct + func NewInvalidKeyValueError(sep, value string) *InvalidKeyValueError + func (err InvalidKeyValueError) Error() string + type LookupEnvFuncType func(key string) (string, bool) + type MapFlag struct + Action ActionFunc + Aliases []string + DefaultText string + Destination *map[K]V + EnvVar string + EnvVarSep string + KeyValSep string + Name string + Splitter SplitterFunc + Usage string + func (flag *MapFlag) GetCategory() string + func (flag *MapFlag) GetValue() string + func (flag *MapFlag) IsSet() bool + func (flag *MapFlag) LookupEnv(envVar string) *string + func (flag *MapFlag) TakesValue() bool + func (flag *MapFlag) Value() FlagValue + func (flag *MapFlag[K, V]) Apply(set *libflag.FlagSet) error + func (flag *MapFlag[K, V]) GetDefaultText() string + func (flag *MapFlag[K, V]) GetEnvVars() []string + func (flag *MapFlag[K, V]) GetUsage() string + func (flag *MapFlag[K, V]) Names() []string + func (flag *MapFlag[K, V]) RunAction(ctx *Context) error + func (flag *MapFlag[K, V]) String() string + type MapFlagKeyType interface + type MapFlagValueType interface + type NormalizeActsType byte + const DoubleDashFlag + const SingleDashFlag + type SliceFlag struct + Action ActionFunc + Aliases []string + DefaultText string + Destination *[]T + EnvVar string + EnvVarSep string + Name string + Splitter SplitterFunc + Usage string + func (flag *SliceFlag) GetCategory() string + func (flag *SliceFlag) GetValue() string + func (flag *SliceFlag) IsSet() bool + func (flag *SliceFlag) LookupEnv(envVar string) *string + func (flag *SliceFlag) TakesValue() bool + func (flag *SliceFlag) Value() FlagValue + func (flag *SliceFlag[T]) Apply(set *libflag.FlagSet) error + func (flag *SliceFlag[T]) GetDefaultText() string + func (flag *SliceFlag[T]) GetEnvVars() []string + func (flag *SliceFlag[T]) GetUsage() string + func (flag *SliceFlag[T]) Names() []string + func (flag *SliceFlag[T]) RunAction(ctx *Context) error + func (flag *SliceFlag[T]) String() string + type SliceFlagType interface + type SplitterFunc func(s, sep string) []string