Documentation
¶
Overview ¶
Package status provides a writer for various types of status and is responsible for making sure all of this output is presented cleanly on Stdout. It also captures output from the standard logger and makes sure its output doesn't interfere with other output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the primary status manager. It implements io.Writer and can function similar to os.Stdout for this purpose. It also captures the standard logger and outputs that with the regular output.
func NewManager ¶
func NewManager() *Manager
NewManager creates a new manager, capturing the current logger.
func (*Manager) Close ¶
Close closes the meter. The meter is left in place, and the standard logger is restored.
func (*Manager) Meter ¶
Meter returns a wrapper meter associated with the given text. The duration is the minimal update frequency of the meter.
func (*Manager) Printf ¶
Printf convenience.
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter is a special writer wrapped around a manager. Writes to the meter should be one or more lines of text. Subsequent writes that did not have another type of write to the underlying Manager will be preceeded by cursor movement and clearning to overwrite the meter with an updated value.
func (*Meter) Close ¶
Close finishes the progress meter. Its output is flushed, and new printing will occur after the meter.
func (*Meter) Printf ¶
Printf for convenience.
func (*Meter) Write ¶
Write sets a progress meter. The write should consist of one or more lines of text followed by '\n' (the entire write should end with '\n'. The lines should be short enough to not wrap the user's terminal. If other writes are interleaved, this text will be cleared, and rewritten after that other text is printed.