ui

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2019 License: MIT Imports: 11 Imported by: 7

Documentation

Overview

Package ui helps get user input from the terminal, and formats output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

func Accept(question string) bool

Accept asks a question and returns the answer

func Blue

func Blue(in string) string

Blue outputs a string in blue.

func BlueBold

func BlueBold(in string) string

BlueBold outputs a string in blue bold.

func GetInput

func GetInput(in *os.File) (string, error)

GetInput from user

func Green

func Green(in string) string

Green outputs a string in green.

func GreenBold

func GreenBold(in string) string

GreenBold outputs a string in green bold.

func Red

func Red(in string) string

Red outputs a string in red.

func RedBold

func RedBold(in string) string

RedBold outputs a string in red bold.

func RemoveColor added in v0.7.1

func RemoveColor(str string) string

func SelectOption

func SelectOption(title, usage string, options []string) (string, error)

SelectOption among several, or input a new one, and return user input.

func SpinWhileThingsHappen

func SpinWhileThingsHappen(title string, f func() error) error

SpinWhileThingsHappen is a way to launch a function and display a spinner while it is being executed.

func UserChoice

func UserChoice(msg string, args ...interface{})

UserChoice message logging

func Yellow

func Yellow(in string) string

Yellow outputs a string in yellow.

func YellowUnderlined

func YellowUnderlined(in string) string

YellowUnderlined outputs a string in yellow, underlined.

Types

This section is empty.

Jump to

Keyboard shortcuts

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