Documentation ¶
Overview ¶
Package term provides functions for controlling the terminal using ANSI escape sequences.
The current functionality has been tested with the Linux TELNET client, Windows TELNET client and Putty.
Index ¶
Constants ¶
Variables ¶
Functions ¶
func GetSize ¶
func GetSize(rw io.ReadWriter) (width, height int)
GetSize attempts to retrieve the current terminal's width and height (columns and lines). If the size cannot be determined a default of 80x25 will be returned.
func Input ¶
Input returns a []byte that should prefix any data writen to the input area.
func Output ¶
Output returns a []byte that should prefix any data writen to the output area.
func Reset ¶
Reset returns a []byte that resets the scroll area and text colours to try and leave the terminal in a reasonable state when the client quits.
func Setup ¶
Setup returns a []byte to display the initial status and input areas.
Types ¶
This section is empty.