Codebase list golang-github-vbauerster-mpb / 6f53ff3
package rename to mpb Vladimir Bauer 9 years ago
3 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 package uiprogress
0 package mpb
11
22 import (
33 "fmt"
44 "math/rand"
55 "time"
66
7 "github.com/vbauerster/uiprogress"
7 "github.com/vbauerster/mpb"
88 )
99
1010 const (
1212 )
1313
1414 func main() {
15 decor := func(s *uiprogress.Statistics) string {
15 decor := func(s *mpb.Statistics) string {
1616 str := fmt.Sprintf("%d/%d", s.Completed, s.Total)
1717 return fmt.Sprintf("%-7s", str)
1818 }
1919
20 p := uiprogress.New().RefreshRate(80 * time.Millisecond)
20 p := mpb.New().RefreshRate(80 * time.Millisecond)
2121
2222 bar1 := p.AddBar(50).AppendETA().PrependFunc(decor)
2323 go func() {
0 package uiprogress
0 package mpb
11
22 import (
33 "fmt"