progressbar

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OptionShowIts = progressbar.OptionShowIts()
)

Functions

This section is empty.

Types

type EasyProgressUtil

type EasyProgressUtil struct {
	progressbar.ProgressBar
}

func NewEasyProgressUtil

func NewEasyProgressUtil(total int, describe string) *EasyProgressUtil

NewEasyProgressUtil create a new progress bar like this: [copying files to 1.1.1.1] 94% [==============================================> ] (18/19, 6 it/s) [3s:0s]

func (*EasyProgressUtil) Fail

func (epu *EasyProgressUtil) Fail(err error)

Fail print error message

func (*EasyProgressUtil) Increment

func (epu *EasyProgressUtil) Increment()

Increment add 1 to progress bar

func (*EasyProgressUtil) Refresh

func (epu *EasyProgressUtil) Refresh()

Refresh make progress bar refresh NB: We have to do this when progress bar is finished, but we want to reuse it

func (*EasyProgressUtil) SetTotal

func (epu *EasyProgressUtil) SetTotal(num int)

SetTotal set total num of progress bar

Jump to

Keyboard shortcuts

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