Documentation
¶
Index ¶
- func HandleCommandError(err error, usage string, description string, flagset *flag.FlagSet)
- func RunCommand(tool_name string, tool_version string, command_list []Command)
- func RunCommandRaw(tool_name string, tool_version string, command_list []Command)
- func ShouldHaveArgs(num_args int, usage string, description string, flagset *flag.FlagSet)
- type Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCommandError ¶
handleCommandAirer catches InvalidInput airer.Airers and prints usage if that was the error thrown. IF a different type of airer.Airer is thrown it just prints the error.
If the command succeeds handleCommandAirer exits the whole go process with code 0
func RunCommand ¶
func RunCommandRaw ¶ added in v0.0.4
The "Raw" version of RunCommand does not contain the default commands 'update version' and 'read nextz'.
func ShouldHaveArgs ¶
shouldHaveArgs does two things:
- validate that the number of args that aren't flags have been provided (i.e. the number of strings after the command name that aren't flags)
- parse the remaining flags
If the wrong number of args is passed it prints helpful usage
Types ¶
Click to show internal directories.
Click to hide internal directories.