cui

package
v0.0.0-...-8ca6fb7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UI

type UI interface {
	Println(a interface{})
	InfoPrintln(a interface{})
	ErrPrintln(a interface{})

	Writer() io.Writer
	ErrWriter() io.Writer
}

UI provides formatted I/O interfaces. It is used from Evans's standard I/O and CLI mode I/O.

func New

func New(r io.Reader, w, ew io.Writer) UI

New creates a new UI with passed io.Reader, io.Writers. In normal case, you can use NewBasic instead of New.

func NewBasic

func NewBasic() UI

NewBasic creates a new UI with stdin, stdout, stderr.

func NewColored

func NewColored(ui UI) UI

NewColored wraps provided `ui` with coloredUI. If `ui` is *coloredUI, NewColored returns it as it is. Colored output works fine in Windows environment.

Jump to

Keyboard shortcuts

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