Documentation
¶
Overview ¶
Package progress renders lightweight, interactive progress feedback to a writer (typically stderr). Output goes to stderr so it never corrupts the summary written to stdout or an output file, and rendering is a no-op when disabled, so callers don't need to special-case quiet or non-terminal runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
IsTerminal reports whether f refers to a character device (an interactive terminal), meaning animated progress is appropriate.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter renders progress lines to a writer using carriage returns so each update overwrites the previous one in place. A nil or disabled Reporter turns every method into a no-op.
func New ¶
New returns a Reporter writing to w. Progress is only rendered when enabled; pass IsTerminal(os.Stderr) so piped or redirected runs stay clean.
func (*Reporter) Done ¶
Done overwrites the current line with msg and terminates it with a newline, leaving a final status visible.