Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCommand ¶
RegisterCommand adds command to the global Commands map
Types ¶
type BaseCommand ¶
BaseCommand implements Command interface
func (BaseCommand) FlagSet ¶
func (b BaseCommand) FlagSet() *flag.FlagSet
FlagSet implements Command
func (BaseCommand) HelpMessage ¶
func (b BaseCommand) HelpMessage(w io.Writer) error
HelpMessage implements Command
func (BaseCommand) ShortDescription ¶
func (b BaseCommand) ShortDescription() string
ShortDescription implements Command
type Command ¶
type Command interface { //FlagSet returns command specific flag set. If command doesn't have any flags nil should be returned. FlagSet() *flag.FlagSet //Run runs command Run(args []string, stdout io.Writer) error //Description returns short description of a command that is shown in the help message ShortDescription() string UsageLine() string HelpMessage(w io.Writer) error }
Command interface represents gorg subcommand
func GetCommand ¶
GetCommand returns command from the global Commands map
type CommandLineError ¶
type CommandLineError string
CommandLineError is returned from the commands when invalid command line parameters are passed
func (CommandLineError) Error ¶
func (e CommandLineError) Error() string
type GenerateCommand ¶
type GenerateCommand struct { BaseCommand // contains filtered or unexported fields }
GenerateCommand implements Command interface
func NewGenerateCommand ¶
func NewGenerateCommand(l remoteTemplateLoader) *GenerateCommand
NewGenerateCommand creates GenerateCommand
type TemplateCommand ¶
type TemplateCommand struct { BaseCommand // contains filtered or unexported fields }
TemplateCommand implements Command interface
func NewTemplateCommand ¶
func NewTemplateCommand(loader remoteTemplateLoader) *TemplateCommand
NewTemplateCommand creates TemplateCommand
Click to show internal directories.
Click to hide internal directories.