prompt

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowHelp

func ShowHelp(cmds map[string]Cmd, args []string)

Types

type Cmd

type Cmd struct {
	Name        string
	Description string
	Usage       string
	Run         func(cmd Cmd, args []string) error
}

type Prompt

type Prompt struct {
	// contains filtered or unexported fields
}

func NewPrompt

func NewPrompt(cmds map[string]Cmd) *Prompt

func (*Prompt) Close

func (p *Prompt) Close()

func (*Prompt) Loop

func (p *Prompt) Loop(prompt string)

func (*Prompt) Prompt

func (p *Prompt) Prompt(prompt string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL