cobra-prompt
cobra-prompt copied to clipboard
Connect cobra and go-prompt
Cobra-Prompt
Cobra-prompt makes every Cobra command and flag available for go-prompt.
- https://github.com/spf13/cobra
- https://github.com/c-bata/go-prompt
Features
- Traverse cobra command tree. Every command and flag will be available.
- Persist flag values.
- Add custom functions for dynamic suggestions.
Getting started
Get the module:
go get github.com/stromland/cobra-prompt
Explore the example
cd _example
go build -o cobra-prompt
./cobra-prompt