progress

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter writes status output. On a terminal, Update overwrites a single status line in place; on a non-terminal, each Update is printed on its own line so logs remain readable. A nil *Reporter is a no-op so callers can pass it around without checking for quiet mode.

func New

func New(w io.Writer) *Reporter

func (*Reporter) Clear

func (r *Reporter) Clear()

Clear erases the current Update line on a TTY. It is a no-op otherwise.

func (*Reporter) Println

func (r *Reporter) Println(format string, a ...any)

Println prints a line that should remain in the output, clearing any pending Update first so it is not overwritten or concatenated.

func (*Reporter) Update

func (r *Reporter) Update(format string, a ...any)

Update prints a transient status line. Subsequent Updates replace it on a TTY; on a non-TTY each call prints a new line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL