ui

package
v0.0.0-...-82dcb70 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Done

func Done()

Done changes the mode to one where no action is taken, and any input closes the program.

func Init

func Init(title string)

Init creates and displays a blank TUI.

func PrintPath

func PrintPath(pre, path, post string)

PrintPath adds a line to the display, with a middle path segment that is truncated at the left rather than the right.

func Printf

func Printf(format string, a ...interface{})

Printf adds a line to the display, formatted by fmt.Sprintf.

func Prompt

func Prompt(s string) rune

Prompt prints the given string and blocks until the user inputs one of the alphanumeric characters shown in parentheses. For example, a prompt containing "(y/n)" would accept either 'y' or 'n' as input. Multiple parentheticals can be included.

func PromptSeed

func PromptSeed(s string) string

PromptSeed waits for the user to input 8 hex digits, then returns the string.

func Run

func Run()

Run runs the TUI, waiting for input from other functions and displaying updated information as needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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