progress

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressBar

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

ProgressBar represents a terminal progress bar

func NewProgressBar

func NewProgressBar(total int, prefix string) *ProgressBar

NewProgressBar creates a new progress bar

func (*ProgressBar) Add

func (pb *ProgressBar) Add(n int)

Add increases the progress by the specified amount

func (*ProgressBar) Finish

func (pb *ProgressBar) Finish()

Finish completes the progress bar

func (*ProgressBar) Increment

func (pb *ProgressBar) Increment()

Increment increases the progress by 1

func (*ProgressBar) SetTestDelay

func (pb *ProgressBar) SetTestDelay(delay time.Duration)

SetTestDelay sets a delay for testing purposes

func (*ProgressBar) SetTotal

func (pb *ProgressBar) SetTotal(total int)

SetTotal updates the total count

type ProgressTracker

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

ProgressTracker manages multiple progress operations

func NewProgressTracker

func NewProgressTracker() *ProgressTracker

NewProgressTracker creates a new progress tracker

func (*ProgressTracker) AddBar

func (pt *ProgressTracker) AddBar(name string, total int, prefix string) *ProgressBar

AddBar adds a new progress bar

func (*ProgressTracker) Clear

func (pt *ProgressTracker) Clear()

Clear removes all progress bars

func (*ProgressTracker) FinishAll

func (pt *ProgressTracker) FinishAll()

FinishAll completes all progress bars

func (*ProgressTracker) GetBar

func (pt *ProgressTracker) GetBar(name string) (*ProgressBar, bool)

GetBar retrieves a progress bar by name

Jump to

Keyboard shortcuts

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