Documentation ¶
Overview ¶
Package cwriter is a console writer abstraction for the underlying OS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotTTY = errors.New("not a terminal")
ErrNotTTY not a TeleTYpewriter error.
Functions ¶
func IsTerminal ¶
IsTerminal returns whether the given file descriptor is a terminal.
Types ¶
type Writer ¶
Writer is a buffered terminal writer, which moves cursor N lines up on each flush except the first one, where N is a number of lines of a previous flush.
func (*Writer) Flush ¶
Flush flushes the underlying buffer. It's caller's responsibility to pass correct number of lines.
func (*Writer) GetTermSize ¶
GetTermSize returns WxH of underlying terminal.
func (*Writer) IsTerminal ¶ added in v8.2.0
IsTerminal tells whether underlying io.Writer is terminal.
Click to show internal directories.
Click to hide internal directories.