Documentation
¶
Index ¶
- func AddDebugMode(command *cobra.Command, debugRun *bool)
- func AddVerboseFlag(command *cobra.Command, verbose *bool)
- func MarkFlagsRequired(command *cobra.Command, flagNames ...string) error
- func NewDebugMenuDriven() *debugMenuDriven
- func NewPtermMenuDriven() *ptermMenuDriven
- func RegisterCommand(parent *cobra.Command, children ...*cobra.Command)
- func WithDefaultValue(defaultValue string) func(*option) error
- type MenuDriven
- type ProgressAnimation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDebugMode ¶
func AddVerboseFlag ¶
func NewDebugMenuDriven ¶
func NewDebugMenuDriven() *debugMenuDriven
func NewPtermMenuDriven ¶
func NewPtermMenuDriven() *ptermMenuDriven
func WithDefaultValue ¶
Types ¶
type MenuDriven ¶
type MenuDriven interface {
GetProgressAnimation() ProgressAnimation
Confirmation(prompt string, opts ...func(*option) error) (proceed bool, err error)
TextInput(prompt string, opts ...func(*option) error) (string, error)
TextInputPassword(prompt string) (string, error)
DropDown(prompt string, options map[string]string, opts ...func(*option) error) (string, error)
DropDownList(prompt string, options []string, opts ...func(*option) error) (string, error)
}
type ProgressAnimation ¶
Click to show internal directories.
Click to hide internal directories.