Bump github.com/vbauerster/mpb/v6 from 6.0.2 to 6.0.3

Bumps [github.com/vbauerster/mpb/v6](https://github.com/vbauerster/mpb) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](https://github.com/vbauerster/mpb/compare/v6.0.2...v6.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-03-26 07:54:00 +00:00
committed by GitHub
parent 9e23e0b3e3
commit b7dda21e33
34 changed files with 220 additions and 429 deletions

View File

@ -94,15 +94,15 @@ func (s *barFiller) parse(style string) {
if !utf8.ValidString(style) {
panic("invalid bar style")
}
srcFormat := make([][]byte, 0, len(BarDefaultStyle))
srcRwidth := make([]int, 0, len(BarDefaultStyle))
gr := uniseg.NewGraphemes(style)
for gr.Next() {
srcFormat = append(srcFormat, gr.Bytes())
srcRwidth = append(srcRwidth, runewidth.StringWidth(gr.Str()))
srcFormat := make([][]byte, len(BarDefaultStyle))
srcRwidth := make([]int, len(BarDefaultStyle))
i := 0
for gr := uniseg.NewGraphemes(style); i < len(BarDefaultStyle) && gr.Next(); i++ {
srcFormat[i] = gr.Bytes()
srcRwidth[i] = runewidth.StringWidth(gr.Str())
}
copy(s.format, srcFormat)
copy(s.rwidth, srcRwidth)
copy(s.format, srcFormat[:i])
copy(s.rwidth, srcRwidth[:i])
if s.reverse {
s.tip = s.format[rRevTip]
s.flush = reverseFlush

View File

@ -5,7 +5,7 @@ require (
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/mattn/go-runewidth v0.0.10
github.com/rivo/uniseg v0.2.0
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78
golang.org/x/sys v0.0.0-20210324051608-47abb6519492
)
go 1.14

View File

@ -7,5 +7,5 @@ github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRC
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
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-20210113181707-4bcb84eeeb78 h1:nVuTkr9L6Bq62qpUqKo/RnZCFfzDBL0bYo6w9OJUqZY=
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=