Documentation
¶
Overview ¶
Package cliutil is a collection of functions to help work with urfave/cli
Index ¶
- func AssembleCommands(commandSlices ...[]cli.Command) (allCommands []cli.Command)
- func ConcatFlags(flagSets ...[]cli.Flag) (res []cli.Flag)
- func CreateMultiwordCommand(orig cli.Command) cli.Command
- func CreateMultiwordCommands(cmds []cli.Command) (newCmds []cli.Command)
- func MergeCommand(dst *cli.Command, src cli.Command)
- func MergeCommands(base []cli.Command, extras []cli.Command) (result []cli.Command)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleCommands ¶
AssembleCommands slices of different command sets, merges and returns them as one full list
func ConcatFlags ¶
ConcatFlags combines multiple slices of flags together without modification
func CreateMultiwordCommand ¶
CreateMultiwordCommand creates a new cli.Command with subcommands for each word with the innermost one being identical to the original, but for the name and for being hidden.
For example, given a command called "example command", this creates a command called "example" with a subcommand called "command" - where "command" is identical to "example command". This is a workaround for urfave/cli not supporting multi-word commands.
func CreateMultiwordCommands ¶
CreateMultiwordCommands is a workaround for urfave/cli not fully supporting multi-word Names for commands in a good way it looks at each subcommand of cmds, and creates hidden command trees to match any multi-word commands found.
func MergeCommand ¶
MergeCommand merges src into dst, only copying non-nil fields of src, and calling mergeCommands upon the .Subcommands and appending all .Flags
Types ¶
This section is empty.