ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCount added in v1.1.0

func FormatCount(n int) string

FormatCount formats a count with thousand separators

func FormatDuration added in v1.1.0

func FormatDuration(d time.Duration) string

FormatDuration formats a duration as a human-readable string

Types

type Progress

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

Progress represents a progress bar with rate and ETA estimation Uses curve fitting (quadratic regression) to predict future rates accounting for acceleration/deceleration patterns in the import

func NewProgress

func NewProgress(label string, total int) *Progress

NewProgress creates a new progress bar

func (*Progress) Done

func (p *Progress) Done()

Done finishes the progress bar and shows elapsed time

func (*Progress) SetTotal added in v1.1.0

func (p *Progress) SetTotal(total int)

SetTotal updates the total (useful when discovered later)

func (*Progress) Update

func (p *Progress) Update(current int)

Update updates the progress and renders

type Spinner

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

Spinner provides a simple animated spinner for long operations

func NewSpinner

func NewSpinner(message string) *Spinner

NewSpinner creates a new spinner with the given message

func (*Spinner) Error

func (s *Spinner) Error(msg string)

Error stops the spinner and shows an error message

func (*Spinner) Start

func (s *Spinner) Start()

Start begins the spinner animation in the background

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the spinner

func (*Spinner) Success

func (s *Spinner) Success(msg string)

Success stops the spinner and shows a success message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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