Documentation
¶
Index ¶
- Constants
- Variables
- type Info
- type MockTerminal
- func (t *MockTerminal) CarriageReturn()
- func (t *MockTerminal) ClearEnd()
- func (t *MockTerminal) ClearLine()
- func (t *MockTerminal) Close() error
- func (t *MockTerminal) CursorDown(count int)
- func (t *MockTerminal) CursorUp(count int)
- func (t *MockTerminal) HideCursor()
- func (t *MockTerminal) IsRaw() bool
- func (t *MockTerminal) ReadKey() (string, error)
- func (t *MockTerminal) SendKey(key string)
- func (t *MockTerminal) SetSize(width, height int)
- func (t *MockTerminal) ShowCursor()
- func (t *MockTerminal) Size() (width, height int, err error)
- func (t *MockTerminal) Write(b []byte) (int, error)
- type SimpleTerminal
- func (t *SimpleTerminal) CarriageReturn()
- func (t *SimpleTerminal) ClearEnd()
- func (t *SimpleTerminal) ClearLine()
- func (t *SimpleTerminal) Close() error
- func (t *SimpleTerminal) CursorDown(count int)
- func (t *SimpleTerminal) CursorUp(count int)
- func (t *SimpleTerminal) HideCursor()
- func (t *SimpleTerminal) IsRaw() bool
- func (t *SimpleTerminal) ReadKey() (string, error)
- func (t *SimpleTerminal) SendKey(key string)
- func (t *SimpleTerminal) SetSize(width, height int)
- func (t *SimpleTerminal) ShowCursor()
- func (t *SimpleTerminal) Size() (width, height int, err error)
- func (t *SimpleTerminal) Write(b []byte) (int, error)
- type Terminal
Constants ¶
View Source
const ( KeyCtrlC = "ctrl+c" KeyCtrlO = "ctrl+o" KeyDown = "down" KeyEnd = "end" KeyHome = "home" KeyPageDown = "page-down" KeyPageUp = "page-up" KeyUp = "up" )
Variables ¶
View Source
var ErrNotATerminal = errors.New("not a terminal")
Functions ¶
This section is empty.
Types ¶
type Info ¶
type MockTerminal ¶
type MockTerminal struct {
// contains filtered or unexported fields
}
func NewMockTerminal ¶
func NewMockTerminal(dest io.Writer, width, height int, raw bool) *MockTerminal
func (*MockTerminal) CarriageReturn ¶
func (t *MockTerminal) CarriageReturn()
func (*MockTerminal) ClearEnd ¶
func (t *MockTerminal) ClearEnd()
func (*MockTerminal) ClearLine ¶
func (t *MockTerminal) ClearLine()
func (*MockTerminal) Close ¶
func (t *MockTerminal) Close() error
func (*MockTerminal) CursorDown ¶
func (t *MockTerminal) CursorDown(count int)
func (*MockTerminal) CursorUp ¶
func (t *MockTerminal) CursorUp(count int)
func (*MockTerminal) HideCursor ¶
func (t *MockTerminal) HideCursor()
func (*MockTerminal) IsRaw ¶
func (t *MockTerminal) IsRaw() bool
func (*MockTerminal) ReadKey ¶
func (t *MockTerminal) ReadKey() (string, error)
func (*MockTerminal) SendKey ¶
func (t *MockTerminal) SendKey(key string)
func (*MockTerminal) SetSize ¶
func (t *MockTerminal) SetSize(width, height int)
func (*MockTerminal) ShowCursor ¶
func (t *MockTerminal) ShowCursor()
func (*MockTerminal) Size ¶
func (t *MockTerminal) Size() (width, height int, err error)
type SimpleTerminal ¶
type SimpleTerminal struct {
// contains filtered or unexported fields
}
func NewSimpleTerminal ¶
func NewSimpleTerminal(dest io.Writer, width, height int) *SimpleTerminal
func (*SimpleTerminal) CarriageReturn ¶
func (t *SimpleTerminal) CarriageReturn()
func (*SimpleTerminal) ClearEnd ¶
func (t *SimpleTerminal) ClearEnd()
func (*SimpleTerminal) ClearLine ¶
func (t *SimpleTerminal) ClearLine()
func (*SimpleTerminal) Close ¶
func (t *SimpleTerminal) Close() error
func (*SimpleTerminal) CursorDown ¶
func (t *SimpleTerminal) CursorDown(count int)
func (*SimpleTerminal) CursorUp ¶
func (t *SimpleTerminal) CursorUp(count int)
func (*SimpleTerminal) HideCursor ¶
func (t *SimpleTerminal) HideCursor()
func (*SimpleTerminal) IsRaw ¶
func (t *SimpleTerminal) IsRaw() bool
func (*SimpleTerminal) ReadKey ¶
func (t *SimpleTerminal) ReadKey() (string, error)
func (*SimpleTerminal) SendKey ¶
func (t *SimpleTerminal) SendKey(key string)
func (*SimpleTerminal) SetSize ¶
func (t *SimpleTerminal) SetSize(width, height int)
func (*SimpleTerminal) ShowCursor ¶
func (t *SimpleTerminal) ShowCursor()
func (*SimpleTerminal) Size ¶
func (t *SimpleTerminal) Size() (width, height int, err error)
Click to show internal directories.
Click to hide internal directories.