Versions in this module Expand all Collapse all v0 v0.16.2 Dec 23, 2024 v0.16.1 Dec 20, 2024 v0.16.0 Dec 20, 2024 v0.15.1 Dec 16, 2024 v0.15.0 Dec 16, 2024 v0.14.0 Nov 29, 2024 v0.13.0 Nov 22, 2024 Changes in this version + const ENABLE_ECHO_INPUT — windows/amd64 + const ENABLE_LINE_INPUT — windows/amd64 + const ENABLE_PROCESSED_INPUT — windows/amd64 + const EVENT_KEY — windows/amd64 + const IgnoreKey + const KeyArrowDown + const KeyArrowLeft + const KeyArrowRight + const KeyArrowUp + const KeyBackspace + const KeyDelete + const KeyDeleteLine + const KeyDeleteWord + const KeyEndTransmission + const KeyEnter + const KeyEscape + const KeyInterrupt + const KeySpace + const KeyTab + const LEFT_CTRL_PRESSED — windows/amd64 + const RIGHT_CTRL_PRESSED — windows/amd64 + const SpecialKeyDelete + const SpecialKeyEnd + const SpecialKeyHome + const VK_DELETE — windows/amd64 + const VK_DOWN — windows/amd64 + const VK_END — windows/amd64 + const VK_HOME — windows/amd64 + const VK_LEFT — windows/amd64 + const VK_RIGHT — windows/amd64 + const VK_UP — windows/amd64 + var InterruptErr = errors.New("interrupt") + func EraseLine(out FileWriter, mode EraseLineMode) error + func NewAnsiStderr(out FileWriter) io.Writer + func NewAnsiStdout(out FileWriter) io.Writer + func StringWidth(str string) int + type BufferedReader struct + Buffer *bytes.Buffer + In io.Reader + func (br *BufferedReader) Read(p []byte) (int, error) + type Coord struct + X Short + Y Short + func (cur Coord) CursorIsAtLineBegin() bool + func (cur Coord) CursorIsAtLineEnd(size *Coord) bool + type Cursor struct + In FileReader + Out FileWriter + func (c *Cursor) Back(n int) error + func (c *Cursor) Down(n int) error + func (c *Cursor) Forward(n int) error + func (c *Cursor) Hide() error + func (c *Cursor) HorizontalAbsolute(x int) error + func (c *Cursor) Location(buf *bytes.Buffer) (*Coord, error) + func (c *Cursor) MoveNextLine(cur *Coord, terminalSize *Coord) error + func (c *Cursor) NextLine(n int) error + func (c *Cursor) PreviousLine(n int) error + func (c *Cursor) Restore() error + func (c *Cursor) Save() error + func (c *Cursor) Show() error + func (c *Cursor) Size(buf *bytes.Buffer) (*Coord, error) + func (c *Cursor) Up(n int) error + type EraseLineMode int + const ERASE_LINE_ALL + const ERASE_LINE_END + const ERASE_LINE_START + type FileReader interface + Fd func() uintptr + type FileWriter interface + Fd func() uintptr + type OnRuneFn func(rune, []rune) ([]rune, bool, error) + type RuneReader struct + func NewRuneReader(stdio Stdio) *RuneReader + func (rr *RuneReader) Buffer() *bytes.Buffer + func (rr *RuneReader) ReadLine(mask rune, onRunes ...OnRuneFn) ([]rune, error) + func (rr *RuneReader) ReadLineWithDefault(mask rune, d []rune, onRunes ...OnRuneFn) ([]rune, error) + func (rr *RuneReader) ReadRune() (rune, int, error) + func (rr *RuneReader) RestoreTermMode() error + func (rr *RuneReader) SetTermMode() error + type Short int16 + var COORDINATE_SYSTEM_BEGIN Short = 0 + var COORDINATE_SYSTEM_BEGIN Short = 1 + type Stdio struct + Err io.Writer + In FileReader + Out FileWriter + type Writer struct — windows/amd64 + func (w *Writer) Write(data []byte) (n int, err error)