maxWidthDistributor without var
Vladimir Bauer
4 years ago
| 1 | 1 |
|
| 2 | 2 |
// make syncWidth func public in test
|
| 3 | 3 |
var SyncWidth = syncWidth
|
| 4 | |
var MaxWidthDistributor = &maxWidthDistributor
|
|
4 |
var MaxWidthDistributor = maxWidthDistributor
|
| 416 | 416 |
}
|
| 417 | 417 |
}
|
| 418 | 418 |
|
| 419 | |
var maxWidthDistributor = func(column []chan int) {
|
|
419 |
func maxWidthDistributor(column []chan int) {
|
| 420 | 420 |
var maxWidth int
|
| 421 | 421 |
for _, ch := range column {
|
| 422 | 422 |
if w := <-ch; w > maxWidth {
|
| 130 | 130 |
ready := make(chan struct{})
|
| 131 | 131 |
start := make(chan struct{})
|
| 132 | 132 |
end := make(chan struct{})
|
| 133 | |
*mpb.MaxWidthDistributor = makeWrapper(*mpb.MaxWidthDistributor, start, end)
|
|
133 |
mpb.MaxWidthDistributor = makeWrapper(mpb.MaxWidthDistributor, start, end)
|
| 134 | 134 |
|
| 135 | 135 |
total := 80
|
| 136 | 136 |
numBars := 6
|