progress

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

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

Progress renders a single-line progress bar to the given writer. All methods are safe for concurrent use.

func New

func New(w io.Writer, fd int, noColor bool) *Progress

New creates a Progress that writes to w and starts a background ticker for spinner animation and terminal width refresh. fd is the file descriptor used to query terminal width.

func (*Progress) Clear

func (p *Progress) Clear()

Clear stops the background ticker and removes the progress bar line. Safe to call multiple times.

func (*Progress) Update

func (p *Progress) Update(status Status)

Update stores the latest status.

type Status

type Status struct {
	Completed int // rule executions completed across all files
	Total     int // total expected rule executions
}

Status represents the current progress of rule execution.

Jump to

Keyboard shortcuts

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