Documentation
¶
Index ¶
- func IndexOf(slice []string, val string) int
- func MovePostFixCommands(args []string, commands []*cli.Command) []string
- func MovePostfixOptions(args []string, validFlags []ParsedFlag) []string
- func ParseArguments(globalFlags []cli.Flag, commands []*cli.Command, args ...string) []string
- type ParsedFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MovePostFixCommands ¶
Places the command being called at the beginning of the args slice for parsing
func MovePostfixOptions ¶
func MovePostfixOptions(args []string, validFlags []ParsedFlag) []string
Used to move non option(-) arguments to the end of the command, this way positional arguments do not have to go before the optional arguments
Arguments do not behave how a unix cli would expect them to:
func ParseArguments ¶
Types ¶
type ParsedFlag ¶
func ParseFlag ¶
func ParseFlag(flag cli.Flag) ParsedFlag
func ParseFlags ¶
func ParseFlags(flags []cli.Flag) []ParsedFlag
Gets a string slice from cli.flags so that they can be moved to their required position from anywhere. This way `tau new --e` and `tau --e new` are both valid commands.
Click to show internal directories.
Click to hide internal directories.