Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Panic ¶
func Panic(err error)
Panic prints a fatal error, fails all pending tasks, and exits with code 1.
func Printf ¶ added in v0.0.4
Printf prints a formatted, multi-line message indented under the current task.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter manages classical terminal output with a live spinner for the active task and a scrolling history of completed / failed tasks above it.
func NewReporter ¶
func NewReporter() *Reporter
NewReporter creates a Reporter that writes to stderr.
func (*Reporter) Done ¶
func (r *Reporter) Done()
Done marks the current (innermost) task as successfully completed.
func (*Reporter) Fail ¶
Fail marks the current (innermost) task as failed. err is printed as an indented paragraph beneath the task line.
func (*Reporter) Printf ¶ added in v0.0.4
Printf prints a formatted, multi-line message indented one level deeper than the current task. The spinner is stopped for the duration of the write and restarted afterwards so the output line does not get overwritten.
func (*Reporter) Quit ¶
func (r *Reporter) Quit()
Quit stops the spinner and marks all remaining tasks as done. Call this when all work has been completed.