diff --git a/_examples/cancel/main.go b/_examples/cancel/main.go index 9da8ed3..23d91ed 100644 --- a/_examples/cancel/main.go +++ b/_examples/cancel/main.go @@ -7,8 +7,8 @@ "sync" "time" - "github.com/vbauerster/mpb" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4" + "github.com/vbauerster/mpb/v4/decor" ) func init() { diff --git a/bar.go b/bar.go index 856a3c5..0cf5e5a 100644 --- a/bar.go +++ b/bar.go @@ -11,7 +11,7 @@ "time" "unicode/utf8" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4/decor" ) // Bar represents a progress Bar diff --git a/bar_filler.go b/bar_filler.go index f58e187..91c2001 100644 --- a/bar_filler.go +++ b/bar_filler.go @@ -4,8 +4,8 @@ "io" "strings" - "github.com/vbauerster/mpb/decor" - "github.com/vbauerster/mpb/internal" + "github.com/vbauerster/mpb/v4/decor" + "github.com/vbauerster/mpb/v4/internal" ) const ( diff --git a/bar_option.go b/bar_option.go index a14b286..71dd091 100644 --- a/bar_option.go +++ b/bar_option.go @@ -4,7 +4,7 @@ "io" "unicode/utf8" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4/decor" ) // BarOption is a function option which changes the default behavior of a bar. diff --git a/bar_test.go b/bar_test.go index 8792859..8081ab7 100644 --- a/bar_test.go +++ b/bar_test.go @@ -9,12 +9,12 @@ "time" "unicode/utf8" - . "github.com/vbauerster/mpb" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4" + "github.com/vbauerster/mpb/v4/decor" ) func TestBarCompleted(t *testing.T) { - p := New(WithOutput(ioutil.Discard)) + p := mpb.New(mpb.WithOutput(ioutil.Discard)) total := 80 bar := p.AddBar(int64(total)) @@ -32,10 +32,10 @@ } func TestBarID(t *testing.T) { - p := New(WithOutput(ioutil.Discard)) + p := mpb.New(mpb.WithOutput(ioutil.Discard)) total := 80 wantID := 11 - bar := p.AddBar(int64(total), BarID(wantID)) + bar := p.AddBar(int64(total), mpb.BarID(wantID)) go func() { for i := 0; i < total; i++ { @@ -57,13 +57,13 @@ var buf bytes.Buffer width := 100 - p := New(WithOutput(&buf), WithWidth(width)) + p := mpb.New(mpb.WithOutput(&buf), mpb.WithWidth(width)) total := 100 till := 30 refillRune := '+' - bar := p.AddBar(int64(total), TrimSpace()) + bar := p.AddBar(int64(total), mpb.TrimSpace()) bar.SetRefill(till, refillRune) bar.IncrBy(till) @@ -90,9 +90,9 @@ func TestBarStyle(t *testing.T) { var buf bytes.Buffer customFormat := "╢▌▌░╟" - p := New(WithOutput(&buf)) + p := mpb.New(mpb.WithOutput(&buf)) total := 80 - bar := p.AddBar(int64(total), BarStyle(customFormat), TrimSpace()) + bar := p.AddBar(int64(total), mpb.BarStyle(customFormat), mpb.TrimSpace()) for i := 0; i < total; i++ { bar.Increment() @@ -116,12 +116,12 @@ func TestBarPanics(t *testing.T) { var buf bytes.Buffer - p := New(WithDebugOutput(&buf), WithOutput(ioutil.Discard)) + p := mpb.New(mpb.WithDebugOutput(&buf), mpb.WithOutput(ioutil.Discard)) wantPanic := "Upps!!!" total := 100 - bar := p.AddBar(int64(total), PrependDecorators(panicDecorator(wantPanic))) + bar := p.AddBar(int64(total), mpb.PrependDecorators(panicDecorator(wantPanic))) go func() { for i := 0; i < 100; i++ { diff --git a/barbench_test.go b/barbench_test.go index d5d904c..ae84322 100644 --- a/barbench_test.go +++ b/barbench_test.go @@ -4,7 +4,7 @@ "io/ioutil" "testing" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4/decor" ) func BenchmarkIncrSingleBar(b *testing.B) { diff --git a/cwriter/writer_posix_test.go b/cwriter/writer_posix_test.go index e2a48a4..31e9d22 100644 --- a/cwriter/writer_posix_test.go +++ b/cwriter/writer_posix_test.go @@ -6,7 +6,7 @@ "bytes" "testing" - . "github.com/vbauerster/mpb/cwriter" + . "github.com/vbauerster/mpb/v4/cwriter" ) // TestWriterPosix by writing and flushing many times. The output buffer diff --git a/decor/percentage.go b/decor/percentage.go index 078fbcf..23938d6 100644 --- a/decor/percentage.go +++ b/decor/percentage.go @@ -3,7 +3,7 @@ import ( "fmt" - "github.com/vbauerster/mpb/internal" + "github.com/vbauerster/mpb/v4/internal" ) // Percentage returns percentage decorator. diff --git a/decorators_test.go b/decorators_test.go index a057197..a951389 100644 --- a/decorators_test.go +++ b/decorators_test.go @@ -4,8 +4,8 @@ "sync" "testing" - . "github.com/vbauerster/mpb" - "github.com/vbauerster/mpb/decor" + . "github.com/vbauerster/mpb/v4" + "github.com/vbauerster/mpb/v4/decor" ) func TestNameDecorator(t *testing.T) { diff --git a/go.mod b/go.mod index fe1c850..b0f62ef 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ require ( github.com/VividCortex/ewma v1.1.1 github.com/mattn/go-isatty v0.0.4 - github.com/vbauerster/mpb v3.3.4+incompatible golang.org/x/crypto v0.0.0-20190129170551-bf88e3f4ba72 golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc // indirect ) diff --git a/go.sum b/go.sum index b975fcb..4296a00 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,6 @@ github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/vbauerster/mpb v3.3.4+incompatible h1:DDIhnwmgTQIDZo+SWlEr5d6mJBxkOLBwCXPzunhEfJ4= -github.com/vbauerster/mpb v3.3.4+incompatible/go.mod h1:zAHG26FUhVKETRu+MWqYXcI70POlC6N8up9p1dID7SU= golang.org/x/crypto v0.0.0-20190129170551-bf88e3f4ba72 h1:hOSpsWG5LMauyHIJqtLUU+44acN/ft/9cpzc1ynVDyg= golang.org/x/crypto v0.0.0-20190129170551-bf88e3f4ba72/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc h1:WiYx1rIFmx8c0mXAFtv5D/mHyKe1+jmuP7PViuwqwuQ= diff --git a/options.go b/options.go index 44a6ee3..d1e2182 100644 --- a/options.go +++ b/options.go @@ -6,7 +6,7 @@ "sync" "time" - "github.com/vbauerster/mpb/cwriter" + "github.com/vbauerster/mpb/v4/cwriter" ) // ProgressOption is a function option which changes the default diff --git a/progress.go b/progress.go index 03fc628..494441b 100644 --- a/progress.go +++ b/progress.go @@ -10,7 +10,7 @@ "sync" "time" - "github.com/vbauerster/mpb/cwriter" + "github.com/vbauerster/mpb/v4/cwriter" ) const ( diff --git a/progress_test.go b/progress_test.go index de34785..3898608 100644 --- a/progress_test.go +++ b/progress_test.go @@ -10,9 +10,8 @@ "testing" "time" - "github.com/vbauerster/mpb" - . "github.com/vbauerster/mpb" - "github.com/vbauerster/mpb/cwriter" + "github.com/vbauerster/mpb/v4" + "github.com/vbauerster/mpb/v4/cwriter" ) var ( @@ -26,7 +25,7 @@ } func TestBarCount(t *testing.T) { - p := New(WithOutput(ioutil.Discard)) + p := mpb.New(mpb.WithOutput(ioutil.Discard)) var wg sync.WaitGroup wg.Add(1) @@ -52,11 +51,11 @@ } func TestBarAbort(t *testing.T) { - p := New(WithOutput(ioutil.Discard)) + p := mpb.New(mpb.WithOutput(ioutil.Discard)) var wg sync.WaitGroup wg.Add(1) - bars := make([]*Bar, 3) + bars := make([]*mpb.Bar, 3) for i := 0; i < 3; i++ { b := p.AddBar(100) bars[i] = b diff --git a/proxyreader_test.go b/proxyreader_test.go index 7006674..280e54a 100644 --- a/proxyreader_test.go +++ b/proxyreader_test.go @@ -6,7 +6,7 @@ "strings" "testing" - "github.com/vbauerster/mpb" + "github.com/vbauerster/mpb/v4" ) const content = `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do diff --git a/spinner_filler.go b/spinner_filler.go index 908c634..74fcb90 100644 --- a/spinner_filler.go +++ b/spinner_filler.go @@ -5,7 +5,7 @@ "strings" "unicode/utf8" - "github.com/vbauerster/mpb/decor" + "github.com/vbauerster/mpb/v4/decor" ) // SpinnerAlignment enum.