progress

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package progress provides pre-configured progress bar utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracker

func NewTracker(message string, total int64) *progress.Tracker

NewTracker creates a new tracker with the given message and total.

Types

type Tracker added in v1.0.1

type Tracker = progress.Tracker

Tracker is an alias for the underlying progress.Tracker type.

type Writer

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

Writer is a wrapper around progress.Writer with pre-configured settings.

func NewWriter

func NewWriter(numTrackers int, quiet bool) *Writer

NewWriter creates a new progress writer with pre-configured settings and colors.

func (*Writer) AppendTracker

func (w *Writer) AppendTracker(tracker *progress.Tracker)

AppendTracker adds a tracker to the progress writer.

func (*Writer) Log

func (w *Writer) Log(msg string, args ...any)

Log prints a message above the progress bars.

func (*Writer) Start

func (w *Writer) Start()

Start begins rendering the progress bars in a goroutine.

func (*Writer) Stop

func (w *Writer) Stop()

Stop stops the progress writer without clearing.

func (*Writer) StopAndClear

func (w *Writer) StopAndClear(numLines int)

StopAndClear stops the progress writer and clears the output.

Jump to

Keyboard shortcuts

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