Skip to content

Commit

Permalink
refactoring complex example
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Nov 22, 2023
1 parent 1fd887f commit 255e1b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _examples/complex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
queue := make([]*mpb.Bar, 2)
queue[0] = p.AddBar(rand.Int63n(201)+100,
mpb.PrependDecorators(
decor.Name(task, decor.WC{W: len(task) + 1, C: decor.DidentRight}),
decor.Name(task, decor.WC{C: decor.DindentRight | decor.DextraSpace}),
decor.Name("downloading", decor.WCSyncSpaceR),
decor.CountersNoUnit("%d / %d", decor.WCSyncWidth),
),
Expand All @@ -37,7 +37,7 @@ func main() {
mpb.BarQueueAfter(queue[0]), // this bar is queued
mpb.BarFillerClearOnComplete(),
mpb.PrependDecorators(
decor.Name(task, decor.WC{W: len(task) + 1, C: decor.DidentRight}),
decor.Name(task, decor.WC{C: decor.DindentRight | decor.DextraSpace}),
decor.OnCompleteMeta(
decor.OnComplete(
decor.Meta(decor.Name("installing", decor.WCSyncSpaceR), toMetaFunc(red)),
Expand Down

0 comments on commit 255e1b7

Please sign in to comment.