terminal

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2017 License: MIT Imports: 4 Imported by: 0

README

survey/terminal

most of this package comes from github.com/k0kubun/go-ansi and has been modified to fit survey's needs.

Documentation

Index

Constants

View Source
const (
	KeyArrowLeft  = '\x02'
	KeyArrowRight = '\x06'
	KeyArrowUp    = '\x10'
	KeyArrowDown  = '\x0e'
	KeySpace      = ' '
	KeyEnter      = '\r'
)

Variables

This section is empty.

Functions

func CursorBack

func CursorBack(n int)

Move the cursor n cells to left.

func CursorDown

func CursorDown(n int)

Move the cursor n cells to down.

func CursorForward

func CursorForward(n int)

Move the cursor n cells to right.

func CursorHide

func CursorHide()

Hide the cursor.

func CursorHorizontalAbsolute

func CursorHorizontalAbsolute(x int)

Move cursor horizontally to x.

func CursorNextLine

func CursorNextLine(n int)

Move cursor to beginning of the line n lines down.

func CursorPreviousLine

func CursorPreviousLine(n int)

Move cursor to beginning of the line n lines up.

func CursorShow

func CursorShow()

Show the cursor.

func CursorUp

func CursorUp(n int)

Move the cursor n cells to up.

func EraseInLine

func EraseInLine(mode int)

func GetReadline

func GetReadline() (*readline.Instance, error)

GetReadline returns the readline instance with the correct configuration

func NewAnsiStderr

func NewAnsiStderr() io.Writer

Returns special stderr, which converts escape sequences to Windows API calls on Windows environment.

func NewAnsiStdout

func NewAnsiStdout() io.Writer

Returns special stdout, which converts escape sequences to Windows API calls on Windows environment.

func Print

func Print(a ...interface{}) (n int, err error)

Print prints given arguments with escape sequence conversion for windows.

func Printf

func Printf(format string, a ...interface{}) (n int, err error)

Printf prints a given format with escape sequence conversion for windows.

func Println

func Println(a ...interface{}) (n int, err error)

Println prints given arguments with newline and escape sequence conversion for windows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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