Documentation ¶
Index ¶
- Variables
- func SetDefaultChannel(channel string)
- func SetDefaultDebugMode(mode int)
- type Command
- func (c *Command) BuildHelp(helpTemplate string) string
- func (c *Command) GetBool(key string, defaultValue bool) bool
- func (c *Command) GetFloat32(key string, defaultValue float32) float32
- func (c *Command) GetFloat64(key string, defaultValue float64) float64
- func (c *Command) GetInt(key string, defaultValue int) int
- func (c *Command) GetString(key string, defaultValue string) string
- func (c *Command) GetUint(key string, defaultValue uint) uint
- func (c *Command) GetUsage() string
- func (c *Command) Help()
- func (c *Command) Init()
- func (c *Command) Name() string
- func (c *Command) RegisterOptional(option string, value string)
- func (c *Command) RegisterPositionals(positionals []string)
- func (c *Command) SetName(name string)
- func (c *Command) Space(key string) string
- type Commandable
- type Commander
- type Listener
- type Logger
- func (l *Logger) DebugLog(params ...interface{})
- func (l *Logger) DebugLogString(params ...string)
- func (l *Logger) Error(params ...string)
- func (l *Logger) Fatal(params ...string)
- func (l *Logger) FatalWithCode(code int, params ...string)
- func (l *Logger) Init(channel string, debug int)
- func (l *Logger) Log(params ...interface{})
- func (l *Logger) LogString(params ...string)
- type Optional
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GlobalOptions = make(map[string]*Optional)
)
Functions ¶
func SetDefaultChannel ¶
func SetDefaultChannel(channel string)
func SetDefaultDebugMode ¶
func SetDefaultDebugMode(mode int)
Types ¶
type Command ¶
type Command struct { Logger CommandName string Positionals []string Optionals map[string]*Optional Values map[string]string Usage string Description string // contains filtered or unexported fields }
Command : Interface describing properties held by command
func (*Command) GetFloat32 ¶ added in v0.0.1
func (*Command) GetFloat64 ¶ added in v0.0.1
func (*Command) Init ¶
func (c *Command) Init()
Init : Here to prevent Logger.Init from overriding a command's Init method
func (*Command) RegisterOptional ¶
func (*Command) RegisterPositionals ¶
type Commandable ¶
type Commander ¶
type Commander struct { Logger Ready func() // contains filtered or unexported fields }
Commander : Command line parser
func (*Commander) Register ¶
func (c *Commander) Register(name string, cmd Commandable)
func (*Commander) RegisterCommands ¶
func (c *Commander) RegisterCommands(cmds map[string]Commandable)
func (*Commander) RegisterOption ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger : This is the logging utility class
func (*Logger) DebugLogString ¶
func (*Logger) FatalWithCode ¶
Click to show internal directories.
Click to hide internal directories.