Codebase list golang-github-vbauerster-mpb / ee72a87
maxWidthDistributor without var Vladimir Bauer 4 years ago
3 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
11
22 // make syncWidth func public in test
33 var SyncWidth = syncWidth
4 var MaxWidthDistributor = &maxWidthDistributor
4 var MaxWidthDistributor = maxWidthDistributor
416416 }
417417 }
418418
419 var maxWidthDistributor = func(column []chan int) {
419 func maxWidthDistributor(column []chan int) {
420420 var maxWidth int
421421 for _, ch := range column {
422422 if w := <-ch; w > maxWidth {
130130 ready := make(chan struct{})
131131 start := make(chan struct{})
132132 end := make(chan struct{})
133 *mpb.MaxWidthDistributor = makeWrapper(*mpb.MaxWidthDistributor, start, end)
133 mpb.MaxWidthDistributor = makeWrapper(mpb.MaxWidthDistributor, start, end)
134134
135135 total := 80
136136 numBars := 6