Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
Console represents the TTY
type UpdatingConsole ¶
UpdatingConsole manages output to the TTY in a fixed-interval
func Updating ¶
func Updating(update time.Duration) *UpdatingConsole
Updating initializes an UpdatingConsole object that updates the console every `update`
func (*UpdatingConsole) Add ¶
func (c *UpdatingConsole) Add(text func() string)
Add adds a row at the end of the console.
func (*UpdatingConsole) AddConst ¶
func (c *UpdatingConsole) AddConst(text string)
AddConst is a convenience method for Add with an invariable string.
func (*UpdatingConsole) Close ¶
func (c *UpdatingConsole) Close(update bool)
Close releases this console's goroutines. Updates if true is passed.
func (*UpdatingConsole) Insert ¶
func (c *UpdatingConsole) Insert(at int, text func() string)
Insert adds the specified string at the given line number. Can be a negative number for negative indexing if line number exceeds total amount of lines, row will be inserted at the end instead.
func (*UpdatingConsole) InsertConst ¶
func (c *UpdatingConsole) InsertConst(at int, text string)
AddConst is a convenience method for Add with an invariable string.
Click to show internal directories.
Click to hide internal directories.