cobra
cobra copied to clipboard
A Commander for modern Go CLI interactions
It generates ``` ## my-command ... ``` instead of ``` # my-command ... ``` The absence of a header level 1 messes up the table of contents generation for certain...
Similar to [CompletionOptions#DisableDefaultCmd](https://pkg.go.dev/github.com/spf13/[email protected]#CompletionOptions) provide a way to prevent the default help command and flag. related #2019
Fixes https://github.com/spf13/cobra/issues/2029
doc.GenMarkdownTree() annotation at the bottom gets interpreted by mkdocs as a navigational section
The `###### Auto generated by spf13/cobra on [...]` line gets interpreted by [mkdocs](https://www.mkdocs.org/) as its own navigational section and presents as a link in the page's table of contents: I'd...
Consider the following example. ```go package main import ( "fmt" "os" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ Use: "app", Short: "A sample CLI program", Long: "A sample CLI program that...
The [user guide](https://github.com/spf13/cobra/blob/main/user_guide.md) is linked from the main README, and I guess it's where most of the people will just land for a quick copy-paste. The guide is showing how...
Hey, I was doing some benchmark test on a app, and I wanted to do e2e, calling the cobra.Command.ExecuteContext(ctx) and I setup the context with a timeout. iex: ctx, cancelFunc...
First, thanks a lot to develop this package. It makes all our work so smooth :) Now, I've got a little problem. I generate the completion command this way: ```go...