tui

package module
v0.0.0-...-8d41a0a Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: MIT Imports: 4 Imported by: 1

README

tui

Text user interface functions for golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear clears the screen.

func Float

func Float(prompt string) float64

Float prompts the user for a floating point value.

func Int

func Int(prompt string) int64

Int prompts a user for an integer.

func Line

func Line()

Line prints a line across the screen ending in a newline.

func Menu(title string, text []string, items ...string) string

Menu displays a menu allowing a user to choose a single item. Lines in text will be displayed before the menu items. Menu items are just key-value string pairs.

func String

func String(prompt string) string

String prompts a user for a string and returns the result. The prompt will have a colon appended to it. The resulting string is stripped of any whitespace.

func StringNotEmpty

func StringNotEmpty(prompt string) string

StringNotEmpty prompts the user for a non-empty string. It keeps asking until a string is returned.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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