You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package utils
|
|
|
|
import "github.com/cheggaaa/pb/v3"
|
|
|
|
type Bar struct {
|
|
pb *pb.ProgressBar
|
|
}
|
|
|
|
func NewBar(count int) *Bar {
|
|
return &Bar{pb.Simple.Start(count)}
|
|
}
|
|
|
|
func (b *Bar) Grow(num int) {
|
|
b.pb.Add(num)
|
|
}
|
|
|
|
func (b *Bar) Done() {
|
|
b.pb.Finish()
|
|
} |