progress

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 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 Manager

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

Manager handles progress bars and cancellation

func NewManager

func NewManager(options Options) *Manager

NewManager creates a new progress manager

func (*Manager) Cleanup

func (pm *Manager) Cleanup()

Cleanup removes signal handlers

func (*Manager) FinishFileProgress

func (pm *Manager) FinishFileProgress()

FinishFileProgress marks the file progress as complete

func (*Manager) FinishTotalProgress

func (pm *Manager) FinishTotalProgress()

FinishTotalProgress marks the total progress as complete

func (*Manager) InitFileProgress

func (pm *Manager) InitFileProgress(totalBytes int64, filename string)

InitFileProgress initializes the per-file progress bar

func (*Manager) InitTotalProgress

func (pm *Manager) InitTotalProgress(totalBytes int64, description string)

InitTotalProgress initializes the total progress bar

func (*Manager) IsCancelled

func (pm *Manager) IsCancelled() bool

IsCancelled checks if the operation was cancelled

func (*Manager) PrintInfo

func (pm *Manager) PrintInfo(format string, args ...interface{})

PrintInfo prints informational messages (unless quiet mode)

func (*Manager) PrintVerbose

func (pm *Manager) PrintVerbose(format string, args ...interface{})

PrintVerbose prints verbose information if verbose mode is enabled

func (*Manager) SetupCancellation

func (pm *Manager) SetupCancellation(ctx context.Context) context.Context

SetupCancellation sets up signal handling for cancellation

func (*Manager) UpdateFileProgress

func (pm *Manager) UpdateFileProgress(bytes int64)

UpdateFileProgress updates the per-file progress bar

func (*Manager) UpdateTotalProgress

func (pm *Manager) UpdateTotalProgress(bytes int64)

UpdateTotalProgress updates the total progress bar

type Options

type Options struct {
	Quiet   bool
	Verbose bool
}

Options configures progress bar behavior

Jump to

Keyboard shortcuts

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