Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusBar ¶
StatusBar is the implementation of configurable status bar.
func NewStatusBar ¶
NewStatusBar returns new StatusBar object, initialized with given template.
Template will be used later on Render calls.
func (*StatusBar) Clear ¶
Clear writes clear sequence in the specified writer, which is represented by terminal erase line sequence.
func (*StatusBar) Lock ¶
func (bar *StatusBar) Lock()
Lock locks StatusBar object if locker object was set with SetLock method to prevent multi-threading race conditions.
StatusBar will be locked in the Set and Render methods.
func (*StatusBar) Render ¶
Render renders specified template and writes it to the specified writer.
Also, render result will be remembered and will be used to generate clear sequence which can be obtained from Clear method call.
func (*StatusBar) SetLock ¶
SetLock sets locker object, that will be used for Lock and Unlock methods.