pb

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizePrompt

func NormalizePrompt(prompt string) string

NormalizePrompt normalizes the prompt string.

func SetDisableProgress added in v0.0.3

func SetDisableProgress(disable bool)

SetDisableProgress disables the progress bar.

Types

type ProgressBar

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

ProgressBar is a progress bar.

func NewProgressBar

func NewProgressBar(writers ...io.Writer) *ProgressBar

NewProgressBar creates a new progress bar.

func (*ProgressBar) Abort added in v0.0.2

func (p *ProgressBar) Abort(name string, err error)

Abort aborts the progress bar.

func (*ProgressBar) Add

func (p *ProgressBar) Add(prompt, name string, size int64, reader io.Reader) io.Reader

Add adds a new progress bar.

func (*ProgressBar) Complete

func (p *ProgressBar) Complete(name string, msg string)

Complete completes the progress bar.

func (*ProgressBar) Get added in v0.0.4

func (p *ProgressBar) Get(name string) *progressBar

Get returns the progress bar.

func (*ProgressBar) Start

func (p *ProgressBar) Start()

Start starts the progress bar.

func (*ProgressBar) Stop

func (p *ProgressBar) Stop()

Stop waits for the progress bar to finish.

Jump to

Keyboard shortcuts

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