diff --git a/bar.go b/bar.go index 475c3c3..77990c3 100644 --- a/bar.go +++ b/bar.go @@ -12,7 +12,7 @@ "github.com/acarl005/stripansi" "github.com/mattn/go-runewidth" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7/decor" ) // Bar represents a progress bar. diff --git a/bar_filler.go b/bar_filler.go index 3d582a4..a69087c 100644 --- a/bar_filler.go +++ b/bar_filler.go @@ -3,7 +3,7 @@ import ( "io" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7/decor" ) // BarFiller interface. diff --git a/bar_filler_bar.go b/bar_filler_bar.go index d1f7ae8..14b3688 100644 --- a/bar_filler_bar.go +++ b/bar_filler_bar.go @@ -6,8 +6,8 @@ "github.com/acarl005/stripansi" "github.com/mattn/go-runewidth" - "github.com/vbauerster/mpb/v6/decor" - "github.com/vbauerster/mpb/v6/internal" + "github.com/vbauerster/mpb/v7/decor" + "github.com/vbauerster/mpb/v7/internal" ) const ( diff --git a/bar_filler_spinner.go b/bar_filler_spinner.go index b2c9095..58ae1c5 100644 --- a/bar_filler_spinner.go +++ b/bar_filler_spinner.go @@ -6,8 +6,8 @@ "github.com/acarl005/stripansi" "github.com/mattn/go-runewidth" - "github.com/vbauerster/mpb/v6/decor" - "github.com/vbauerster/mpb/v6/internal" + "github.com/vbauerster/mpb/v7/decor" + "github.com/vbauerster/mpb/v7/internal" ) const ( diff --git a/bar_option.go b/bar_option.go index e359c11..46b7de0 100644 --- a/bar_option.go +++ b/bar_option.go @@ -4,8 +4,8 @@ "bytes" "io" - "github.com/vbauerster/mpb/v6/decor" - "github.com/vbauerster/mpb/v6/internal" + "github.com/vbauerster/mpb/v7/decor" + "github.com/vbauerster/mpb/v7/internal" ) // BarOption is a func option to alter default behavior of a bar. diff --git a/bar_test.go b/bar_test.go index 4e62287..12f4915 100644 --- a/bar_test.go +++ b/bar_test.go @@ -10,8 +10,8 @@ "time" "unicode/utf8" - "github.com/vbauerster/mpb/v6" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7" + "github.com/vbauerster/mpb/v7/decor" ) func TestBarCompleted(t *testing.T) { diff --git a/barbench_test.go b/barbench_test.go index 76beece..ab1d602 100644 --- a/barbench_test.go +++ b/barbench_test.go @@ -4,7 +4,7 @@ "io/ioutil" "testing" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7/decor" ) func BenchmarkIncrSingleBar(b *testing.B) { diff --git a/container_option.go b/container_option.go index b92c757..e4254f6 100644 --- a/container_option.go +++ b/container_option.go @@ -6,7 +6,7 @@ "sync" "time" - "github.com/vbauerster/mpb/v6/internal" + "github.com/vbauerster/mpb/v7/internal" ) // ContainerOption is a func option to alter default behavior of a bar diff --git a/decor/doc.go b/decor/doc.go index bfbb82e..4e42993 100644 --- a/decor/doc.go +++ b/decor/doc.go @@ -1,20 +1,19 @@ -// Package decor provides common decorators for "github.com/vbauerster/mpb/v6" module. -/* - Some decorators returned by this package might have a closure state. It is ok to use - decorators concurrently, unless you share the same decorator among multiple - *mpb.Bar instances. To avoid data races, create new decorator per *mpb.Bar instance. - - Don't: - - p := mpb.New() - name := decor.Name("bar") - p.AddBar(100, mpb.AppendDecorators(name)) - p.AddBar(100, mpb.AppendDecorators(name)) - - Do: - - p := mpb.New() - p.AddBar(100, mpb.AppendDecorators(decor.Name("bar1"))) - p.AddBar(100, mpb.AppendDecorators(decor.Name("bar2"))) -*/ +// Package decor provides common decorators for "github.com/vbauerster/mpb/v7" module. +// +// Some decorators returned by this package might have a closure state. It is ok to use +// decorators concurrently, unless you share the same decorator among multiple +// *mpb.Bar instances. To avoid data races, create new decorator per *mpb.Bar instance. +// +// Don't: +// +// p := mpb.New() +// name := decor.Name("bar") +// p.AddBar(100, mpb.AppendDecorators(name)) +// p.AddBar(100, mpb.AppendDecorators(name)) +// +// Do: +// +// p := mpb.New() +// p.AddBar(100, mpb.AppendDecorators(decor.Name("bar1"))) +// p.AddBar(100, mpb.AppendDecorators(decor.Name("bar2"))) package decor diff --git a/decor/percentage.go b/decor/percentage.go index f4922bb..2b0a7a9 100644 --- a/decor/percentage.go +++ b/decor/percentage.go @@ -5,7 +5,7 @@ "io" "strconv" - "github.com/vbauerster/mpb/v6/internal" + "github.com/vbauerster/mpb/v7/internal" ) type percentageType float64 diff --git a/decorators_test.go b/decorators_test.go index 99c49ce..788cc85 100644 --- a/decorators_test.go +++ b/decorators_test.go @@ -4,8 +4,8 @@ "sync" "testing" - "github.com/vbauerster/mpb/v6" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7" + "github.com/vbauerster/mpb/v7/decor" ) func TestNameDecorator(t *testing.T) { diff --git a/example_test.go b/example_test.go index 38820e1..cde49f8 100644 --- a/example_test.go +++ b/example_test.go @@ -7,8 +7,8 @@ "math/rand" "time" - "github.com/vbauerster/mpb/v6" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7" + "github.com/vbauerster/mpb/v7/decor" ) func Example() { diff --git a/go.mod b/go.mod index d9dad96..2735887 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,10 @@ -module github.com/vbauerster/mpb/v6 +module github.com/vbauerster/mpb/v7 require ( github.com/VividCortex/ewma v1.2.0 github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d - github.com/mattn/go-runewidth v0.0.12 - github.com/rivo/uniseg v0.2.0 - golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 + github.com/mattn/go-runewidth v0.0.13 + golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1 ) go 1.14 diff --git a/go.sum b/go.sum index 08ee82f..b984aa3 100644 --- a/go.sum +++ b/go.sum @@ -2,10 +2,9 @@ github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= -github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1 h1:lCnv+lfrU9FRPGf8NeRuWAAPjNnema5WtBinMgs1fD8= +golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/progress.go b/progress.go index cd5b6c7..77eb0d8 100644 --- a/progress.go +++ b/progress.go @@ -13,8 +13,8 @@ "sync" "time" - "github.com/vbauerster/mpb/v6/cwriter" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7/cwriter" + "github.com/vbauerster/mpb/v7/decor" ) const ( diff --git a/progress_test.go b/progress_test.go index aa7a27d..86bfdaf 100644 --- a/progress_test.go +++ b/progress_test.go @@ -9,8 +9,8 @@ "testing" "time" - "github.com/vbauerster/mpb/v6" - "github.com/vbauerster/mpb/v6/decor" + "github.com/vbauerster/mpb/v7" + "github.com/vbauerster/mpb/v7/decor" ) func init() { diff --git a/proxyreader_test.go b/proxyreader_test.go index 71e036b..923226e 100644 --- a/proxyreader_test.go +++ b/proxyreader_test.go @@ -7,7 +7,7 @@ "strings" "testing" - "github.com/vbauerster/mpb/v6" + "github.com/vbauerster/mpb/v7" ) const content = `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do