progress

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DEFAULT_WIDTH = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressBar

type ProgressBar struct {
	Total int

	Width int
	// contains filtered or unexported fields
}

func NewProgressBar

func NewProgressBar(total int, colors ...color.Attribute) *ProgressBar

func (*ProgressBar) Increment

func (bar *ProgressBar) Increment(size int)

func (*ProgressBar) SetColor added in v0.0.7

func (bar *ProgressBar) SetColor(attributes ...color.Attribute)

var cha chan struct{}

func (*ProgressBar) Start

func (bar *ProgressBar) Start()

func (*ProgressBar) Wait

func (bar *ProgressBar) Wait()

type ProgressWriter

type ProgressWriter struct {
	Writer *bufio.Writer
	// contains filtered or unexported fields
}

func NewProgressWriter

func NewProgressWriter(w io.Writer, total int) ProgressWriter

func (ProgressWriter) Write

func (pw ProgressWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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