meter

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 5 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoProgressMeter noProgressMeter

NoProgressMeter is a `Progress` that doesn't actually report anything.

View Source
var Spinners = []string{"|", "(", "<", "-", "<", "(", "|", ")", ">", "-", ">", ")"}

Spinners is a slice of short strings that are repeatedly output in order to show the user that we are working, before we have any actual information to show.

Functions

This section is empty.

Types

type Progress

type Progress interface {
	Start(format string)
	Inc()
	Add(delta int64)
	Done()
}

Progress is an interface for a simple progress meter. Call `Start()` to begin reporting. `format` should include some kind of '%d' field, into which will be written the current count. A spinner and a CR character will be added automatically.

Call `Inc()` every time the quantity of interest increases. Call `Stop()` to stop reporting. After an instance's `Stop()` method has been called, it may be reused (starting at value 0) by calling `Start()` again.

func NewProgressMeter

func NewProgressMeter(w io.Writer, period time.Duration) Progress

NewProgressMeter returns a progress meter that can be used to show progress to a TTY periodically, including an increasing int64 value.

Jump to

Keyboard shortcuts

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