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
Click to show internal directories.
Click to hide internal directories.