Categorygithub.com/stromland/cobra-prompt
modulepackage
0.5.0
Repository: https://github.com/stromland/cobra-prompt.git
Documentation: pkg.go.dev

# README

Cobra-Prompt

Cobra-prompt makes every Cobra command and flag available for 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

# Constants

DynamicSuggestionsAnnotation for dynamic suggestions.
PersistFlagValuesFlag the flag that will be avaiailable when PersistFlagValues is true.

# Structs

CobraPrompt given a Cobra command it will make every flag and sub commands available as suggestions.