cobra
cobra copied to clipboard
A Commander for modern Go CLI interactions
Hi, and thanks for a wonderful library! To jump right into action, this is a help message I'm getting now: ``` This is a script to generate some random (but...
This method is the OnInitialize counterpart. Like OnInitialize which allows loading the configuration before each command is executed, OnFinalize allows saving the configuration after each command has been executed.
support pFlag `AddParentFlagSet` (https://github.com/spf13/pflag/pull/357) Signed-off-by: fahed dorgaa
This is related to the 'minimal distance' between strings It seems that this functionality only works at first level of command, and not at sub-levels ? Suggestions when "unknown command"...
I am trying to generate documentation for a CLI tool that has deprecated (and hidden) command flags, and I believe the generated documentation should not contain these flags unless they...
It would be nice to have command-specific initializers in addition to the global ones: **Changes in command.go** ```go func (c *Command) OnInitialize(y ...func()) { c.initializers = append(c.initializers, y...) } func...
If your CLI supports `cli foo --bar` and you type `cli fooo --bar`, you get an error that the flag is unknown. In reality, the command is unknown, so the...
I want to be able to support something like this: ``` app --min=1 --max=5 or app --range=1:5 or app --min=2 --range=1:10 --max=5 ``` Meaning, there's a min and max value...
Hi team. I'm developing a small application that will allow the user to look at 50 or more lines from a database table. So, is there any feature (even third...
I could have sworn I've seen an example where you can have a custom flag parsing func OR a way to set a Uint flag to accept either hex or...