progress

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Thousand = 1000
	Million  = Thousand * 1000
	Billion  = Million * 1000
)
View Source
const (
	Byte = 1

	KiloByte = Byte * 1000
	MegaByte = KiloByte * 1000
	GigaByte = MegaByte * 1000
	TeraByte = GigaByte * 1000

	KibiByte = Byte * 1024
	MebiByte = KibiByte * 1024
	GibiByte = MebiByte * 1024
)

Variables

This section is empty.

Functions

func HumanBytes

func HumanBytes(b int64) string

func HumanBytes2

func HumanBytes2(b uint64) string

func HumanNumber

func HumanNumber(b uint64) string

func ShowLoadingAnimation

func ShowLoadingAnimation(stopChan chan struct{}, wg *sync.WaitGroup, msg string)

Types

type Bar

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

func NewBar

func NewBar(message string, maxValue, initialValue int64) *Bar

func (*Bar) Set

func (b *Bar) Set(value int64)

func (*Bar) String

func (b *Bar) String() string

type Progress

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

func NewProgress

func NewProgress(w io.Writer) *Progress

func (*Progress) Add

func (p *Progress) Add(key string, state State)

func (*Progress) Stop

func (p *Progress) Stop() bool

func (*Progress) StopAndClear

func (p *Progress) StopAndClear() bool

type Spinner

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

func NewSpinner

func NewSpinner(message string) *Spinner

func (*Spinner) SetMessage

func (s *Spinner) SetMessage(message string)

func (*Spinner) Stop

func (s *Spinner) Stop()

func (*Spinner) String

func (s *Spinner) String() string

type State

type State interface {
	String() string
}

Jump to

Keyboard shortcuts

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