Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "0.0.4"
Version contains the client version number
Variables ¶
View Source
var CmdRunner = NewRunner()
CmdRunner is the default command runner
Functions ¶
This section is empty.
Types ¶
type Args ¶
Args contains a command and its params
func (*Args) FirstParam ¶
FirstParam returns the first param. It returns empty string if there are no params.
func (*Args) IsParamsEmpty ¶
IsParamsEmpty checks if the params size is 0
type Command ¶
type Command struct {
Run func(cmd *Command, args *Args)
Flag flag.FlagSet
Key string
Usage string
Short string
Long string
}
Command contains a function to run, a flagset, and usage instructions
func (*Command) FormattedUsage ¶
FormattedUsage returns the formatted usage for runnable command
func (*Command) Name ¶
Name returns the name of the command. It falls back on the first word in Usage if no Name was provided.
func (*Command) PrintUsage ¶
func (c *Command) PrintUsage()
PrintUsage prints usage instructions for the command
Click to show internal directories.
Click to hide internal directories.