Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StyleThinUnicode = &simpletable.Style{ Border: &simpletable.BorderStyle{ TopLeft: "┌", Top: "─", TopRight: "┐", Right: "│", BottomRight: "┘", Bottom: "─", BottomLeft: "└", Left: "│", TopIntersection: "┬", BottomIntersection: "┴", }, Divider: &simpletable.DividerStyle{ Left: "├", Center: "─", Right: "┤", Intersection: "┼", }, Cell: "│", }
Functions ¶
func RunCommand ¶
func RunCommand(registry Registry)
func UnpackArguments ¶
Types ¶
type Command ¶
type Command struct { Command string Title string Description string Args []CommandArgument ExampleUsage map[string]string Handler func(c CommandArgumentValue) }
func (Command) FindMissingArgs ¶
func (c Command) FindMissingArgs(args []string) []CommandArgument
func (Command) HasCorrectAmountOfArgs ¶
type CommandArgument ¶
type CommandArgumentValue ¶
func (CommandArgumentValue) ArgumentExist ¶
func (c CommandArgumentValue) ArgumentExist(key string) bool
func (CommandArgumentValue) ArgumentOnly ¶
func (c CommandArgumentValue) ArgumentOnly(key string) bool
func (CommandArgumentValue) GetArgument ¶
func (c CommandArgumentValue) GetArgument(key string, defaultValue string) string
func (CommandArgumentValue) NoArguments ¶
func (c CommandArgumentValue) NoArguments() bool
type Registry ¶
func MakeRegistry ¶
func MakeRegistry() Registry
func (*Registry) AddCommand ¶
func (*Registry) GetCommand ¶
func (*Registry) GetCommands ¶
Click to show internal directories.
Click to hide internal directories.