Versions in this module Expand all Collapse all v1 v1.0.0 Sep 5, 2018 v0 v0.0.1 May 27, 2018 Changes in this version + func Main(a *App) + type App struct + func New(c *Config) (a *App) + func (a *App) AddCommand(cmd *Command) + func (a *App) Commands() *Commands + func (a *App) Config() *Config + func (a *App) IsShell() bool + func (a *App) OnInit(f func(a *App, flags FlagMap) error) + func (a *App) OnShell(f func(a *App) error) + func (a *App) PrintError(err error) + func (a *App) Run() (err error) + func (a *App) RunCommand(args []string) error + func (a *App) SetDefaultPrompt() + func (a *App) SetInterruptHandler(f func(a *App, count int)) + func (a *App) SetPrintASCIILogo(f func(a *App)) + func (a *App) SetPrintCommandHelp(f func(a *App, c *Command, shell bool)) + func (a *App) SetPrintHelp(f func(a *App, shell bool)) + func (a *App) SetPrompt(p string) + type Command struct + Aliases []string + AllowArgs bool + Completer func(prefix string, args []string) []string + Flags func(f *Flags) + Help string + HelpGroup string + LongHelp string + Name string + Run func(c *Context) error + Usage string + func (c *Command) AddCommand(cmd *Command) + func (c *Command) Parent() *Command + type Commands struct + func (c *Commands) Add(cmd *Command) + func (c *Commands) All() []*Command + func (c *Commands) FindCommand(args []string) (cmd *Command, rest []string, err error) + func (c *Commands) Get(name string) *Command + func (c *Commands) Sort() + func (c *Commands) SortRecursive() + type Config struct + ASCIILogoColor *color.Color + Description string + ErrorColor *color.Color + Flags func(f *Flags) + HelpHeadlineColor *color.Color + HelpHeadlineUnderline bool + HelpSubCommands bool + HistoryFile string + HistoryLimit int + MultiPrompt string + MultiPromptColor *color.Color + Name string + NoColor bool + Prompt string + PromptColor *color.Color + func (c *Config) SetDefaults() + func (c *Config) Validate() error + type Context struct + App *App + Args []string + Command *Command + Flags FlagMap + func (c *Context) Stop() + type FlagMap map[string]*FlagMapItem + func (f FlagMap) Bool(long string) bool + func (f FlagMap) Duration(long string) time.Duration + func (f FlagMap) Float64(long string) float64 + func (f FlagMap) Int(long string) int + func (f FlagMap) Int64(long string) int64 + func (f FlagMap) String(long string) string + func (f FlagMap) Uint(long string) uint + func (f FlagMap) Uint64(long string) uint64 + type FlagMapItem struct + IsDefault bool + Value interface{} + type Flags struct + func (f *Flags) Bool(short, long string, defaultValue bool, help string) + func (f *Flags) BoolL(long string, defaultValue bool, help string) + func (f *Flags) Duration(short, long string, defaultValue time.Duration, help string) + func (f *Flags) DurationL(long string, defaultValue time.Duration, help string) + func (f *Flags) Float64(short, long string, defaultValue float64, help string) + func (f *Flags) Float64L(long string, defaultValue float64, help string) + func (f *Flags) Int(short, long string, defaultValue int, help string) + func (f *Flags) Int64(short, long string, defaultValue int64, help string) + func (f *Flags) Int64L(long string, defaultValue int64, help string) + func (f *Flags) IntL(long string, defaultValue int, help string) + func (f *Flags) String(short, long, defaultValue, help string) + func (f *Flags) StringL(long, defaultValue, help string) + func (f *Flags) Uint(short, long string, defaultValue uint, help string) + func (f *Flags) Uint64(short, long string, defaultValue uint64, help string) + func (f *Flags) Uint64L(long string, defaultValue uint64, help string) + func (f *Flags) UintL(long string, defaultValue uint, help string)