Documentation
¶
Index ¶
- type App
- type Command
- type CommandHandler
- type Context
- func (c *Context) Argument(name string) string
- func (c *Context) Confirm(msg string) bool
- func (c *Context) Flag(name string) (interface{}, error)
- func (c *Context) FlagString(name string) string
- func (c *Context) Get(msg string) (string, error)
- func (c *Context) Output(value string)
- func (c *Context) Outputf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App contains the configuration for a command line application
type Command ¶
type Command struct {
Description string
// contains filtered or unexported fields
}
Command represents a single sub-command in the application
func (*Command) Configure ¶
Configure calls the passed function with the command.
This is a convenience method for chaining `app.Command("thing", thingHandler).Configure(func(c *Command) { ... })`
type CommandHandler ¶
CommandHandler is the function that will be called when a user performs a sub-command
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is used to hold the state of the application
func (*Context) Flag ¶
Flag returns a flag with the passed name. If the flag is not found an error will be returned.
func (*Context) FlagString ¶
FlagString returns a flag string value.
This will panic if the flag does not exist
Click to show internal directories.
Click to hide internal directories.