Versions in this module Expand all Collapse all v1 v1.0.0 Jan 28, 2020 Changes in this version + const CommandCd + const CommandClearCache + const CommandCopy + const CommandCreate + const CommandDir + const CommandEcho + const CommandHelp + const CommandLs + const CommandRm + const CommandWatch + func BuildCompleter() *readline.PrefixCompleter + func RegisterCommand(cmd Command) + type ArgumentDefintion interface + IsOptional func() bool + type BaseCommand struct + func NewBaseCommand(cmd string, argDefs []ArgumentDefintion, flagDefs []FlagDefintion) *BaseCommand + func (cmd *BaseCommand) GetCommand() string + func (cmd *BaseCommand) GetFlags() map[string]bool + func (cmd *BaseCommand) GetParameter(idx int, defaultValue string) string + func (cmd *BaseCommand) GetParams() []string + func (cmd *BaseCommand) IsFlagSet(flag ...string) bool + func (cmd *BaseCommand) SetFlags(flags map[string]bool) + func (cmd *BaseCommand) SetParams(params []string) + type Command interface + Completer func(ctx context.Container, input string) []string + Execute func(ctx context.Container, buffer *string) (uint, error) + GetCommand func() string + GetFlags func() map[string]bool + GetParameter func(idx int, defaultValue string) string + GetParams func() []string + IsFlagSet func(flag ...string) bool + SetFlags func(flags map[string]bool) + SetParams func(params []string) + func FindCommand(cmd string) (Command, error) + func ParseEditorCommand(editorCmd string) (Command, error) + type FlagDefintion interface + GetDefaultValue func() interface{} + GetShortName func() string + type GenericArgumentDefinition struct + Description *text.Template + Example string + Name string + Optional bool + func (fd *GenericArgumentDefinition) GetDescription(selection uint) string + func (fd *GenericArgumentDefinition) GetExample() string + func (fd *GenericArgumentDefinition) GetName() string + func (fd *GenericArgumentDefinition) IsOptional() bool + type GenericFlagDefinition struct + DefaultValue interface{} + Description *text.Template + Example string + Name string + ShortName string + func (fd *GenericFlagDefinition) GetDefaultValue() interface{} + func (fd *GenericFlagDefinition) GetDescription(selection uint) string + func (fd *GenericFlagDefinition) GetExample() string + func (fd *GenericFlagDefinition) GetName() string + func (fd *GenericFlagDefinition) GetShortName() string + type ParamDefinition interface + GetDescription func(selection uint) string + GetExample func() string + GetName func() string