ui

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ESCAPE = 27

ESCAPE is the ASCII code for escape character

Variables

This section is empty.

Functions

func PromptYesNo

func PromptYesNo(question string) (bool, error)

PromptYesNo asks the question and defaults to Yes

Types

type Columnizer

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

func NewColumnizer

func NewColumnizer() *Columnizer

NewColumnizer creates a new table with sensible defaults

func (*Columnizer) AddRow

func (t *Columnizer) AddRow(contents ...string)

func (*Columnizer) String

func (t *Columnizer) String() string

Returns string representation of the table

type StdoutWriter

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

StdoutWriter is an "in-place" writer for the StdOut

func NewStdoutWriter

func NewStdoutWriter() *StdoutWriter

NewStdoutWriter returns a new Writer

func (*StdoutWriter) Flush

func (w *StdoutWriter) Flush() error

Flush writes to os.Stdout out and resets the cursor position and buffer.

func (*StdoutWriter) Write

func (w *StdoutWriter) Write(b []byte) (n int, err error)

Write adds to its buffers.

Jump to

Keyboard shortcuts

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