progress

package
v1.0.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Total = 100

Total of intervals

View Source
var Width = 40

Width of standard progress bar

Functions

func Start

func Start()

Start progress bars

func Stop

func Stop()

Stop progress bars

Types

type Bar

type Bar struct {
	// Name to prepend to the progress bar
	Name string
	// Prepend value to the progress bar after its name
	Prepend string
	// Append value to the progress bar
	Append string
	// contains filtered or unexported fields
}

Bar holds the progress bar data

func New

func New(name string) *Bar

New progress bar instance

func (*Bar) Current

func (b *Bar) Current() int

Current position of the progress bar

func (*Bar) Fail

func (b *Bar) Fail()

Fail (give up)

func (*Bar) Flow

func (b *Bar) Flow()

Flow repeats flowing the progress bar from begin to end continuously

func (*Bar) Reset

func (b *Bar) Reset(msgPrepend, msgAppend string)

Reset progress bar and reset its prepend and append messages

func (*Bar) Set

func (b *Bar) Set(n int)

Set progress bar position

Jump to

Keyboard shortcuts

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