terminal

package
v0.0.0-...-8966abf Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2016 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTermSize = errors.New("Can't get terminal size.")
)

Functions

func CursorUp

func CursorUp(count int) string

CursorUp returns the escape code to set the cursor n lines before the current position.

func GetColumns

func GetColumns(widthstr string) (int, error)

GetColumns returns the column count based on a string passed. Supported formats: 20% (relative to term width) 0.2 (relative to term width) 20 (columns)

func NewLine

func NewLine() string

NewLine returns a string containing an escape code to reset all colors and a space. This is needed to prevent artifacts after the end of this line if the terminal gets resized.

Types

This section is empty.

Jump to

Keyboard shortcuts

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