Documentation ¶
Index ¶
- Variables
- func InputBigInt(pr string) *big.Int
- func InputBigIntWithDefault(pr string, d *big.Int) *big.Int
- func InputFilename(pr string, rootPath string, mustExit bool) (string, error)
- func InputIntWithDefault(pr string, def int) (int, bool)
- func InputMultiChoice(pr string, def string, choices []prompt.Suggest, ...) (string, bool)
- func InputMultiChoiceString(pr string, def string, choices []string, helpFunc func(c []prompt.Suggest)) (string, bool)
- func InputPassword() (string, error)
- func InputPath(pr string, rootPath string, mustExist bool, ...) (string, error)
- func InputText(pr string) string
- func InputYesNo(pr string, def bool) (bool, bool)
- func NewAbsolutePathFilter(rootPath string) func(string, string) (prompt.Suggest, bool)
- func ShowHelp(node *MenuCompleter)
- type MenuCompleter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UpCommand = &MenuCompleter{Suggestion: &prompt.Suggest{Text: "..", Description: "move to the parent menu", }} HelpCommand = &MenuCompleter{Suggestion: &prompt.Suggest{ Text: "help", Description: "show the help for the current menu", }} ExitCommand = &MenuCompleter{Suggestion: &prompt.Suggest{ Text: "exit", Description: "exit the interactive console", }} TailCommands = []*MenuCompleter{UpCommand, HelpCommand, ExitCommand} )
Functions ¶
func InputBigInt ¶
func InputMultiChoice ¶
func InputMultiChoiceString ¶
func InputPassword ¶
func NewAbsolutePathFilter ¶
func ShowHelp ¶
func ShowHelp(node *MenuCompleter)
Types ¶
type MenuCompleter ¶
type MenuCompleter struct { Suggestion *prompt.Suggest Sub []*MenuCompleter Parent *MenuCompleter }
func NewMenuCompleter ¶
func NewMenuCompleter(cmd *cobra.Command, parent *MenuCompleter) *MenuCompleter
func NewRootNode ¶
func NewRootNode(entries []*MenuCompleter) *MenuCompleter
func (*MenuCompleter) Completer ¶
func (cc *MenuCompleter) Completer(doc prompt.Document) []prompt.Suggest
func (*MenuCompleter) Name ¶
func (cc *MenuCompleter) Name() string
func (*MenuCompleter) Prompt ¶
func (cc *MenuCompleter) Prompt(p string) string
Click to show internal directories.
Click to hide internal directories.