Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BoolVar = flag.BoolVar DurationVar = flag.DurationVar Int64Var = flag.Int64Var IntVar = flag.IntVar StringVar = flag.StringVar Uint64Var = flag.Uint64Var UintVar = flag.UintVar StringSliceVar = flag.StringSliceVar BoolVarP = flag.BoolVarP DurationVarP = flag.DurationVarP Int64VarP = flag.Int64VarP IntVarP = flag.IntVarP StringVarP = flag.StringVarP Uint64VarP = flag.Uint64VarP UintVarP = flag.UintVarP StringSliceVarP = flag.StringSliceVarP PrintDefaults = flag.PrintDefaults )
Flag variable binding functions from spf13/pflag.
Functions ¶
Types ¶
type App ¶
type App struct {
Name string
// contains filtered or unexported fields
}
App is the cli entrypoint.
func (*App) AddCommand ¶
AddCommand adds a command to the app.
func (*App) HelpCommand ¶
HelpCommand prints out help for a specific command.
func (*App) RunWithArgs ¶
RunWithArgs is a cli entrypoint which sets up a cancellable context for the command.
type Command ¶
type Command struct {
Name, Title string
Bind func(*flag.FlagSet)
Run func(context.Context, []string) error
}
Command is an individual command
type CommandInfo ¶
CommandInfo is the constructor info for a command
Click to show internal directories.
Click to hide internal directories.