Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidUsage = errors.New("invalid usage")
ErrInvalidUsage when returned by a Handler the usage message is displayed.
Functions ¶
func ArgsToMap ¶
sliceToMap converts sequence of arguments into a key-value map. [a, b, c, d] => {a: b, c: d} or errors when number of args is not even.
func OutputJSON ¶
OutputJSON prints indented json to stdout.
func OutputLine ¶
OutputLine prints the given string to stdout appending a new-line char.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI is a cli subcommands executor.
type Command ¶
type Command struct { Name string Alias string Help string Desc string Handler HandlerFunc ParseFunc func(*flag.FlagSet) }
Command is a cli subcommand.
Click to show internal directories.
Click to hide internal directories.