diff --git a/export_test.go b/export_test.go index fba0eaf..243429b 100644 --- a/export_test.go +++ b/export_test.go @@ -2,4 +2,4 @@ // make syncWidth func public in test var SyncWidth = syncWidth -var MaxWidthDistributor = &maxWidthDistributor +var MaxWidthDistributor = maxWidthDistributor diff --git a/progress.go b/progress.go index ede745f..241b548 100644 --- a/progress.go +++ b/progress.go @@ -417,7 +417,7 @@ } } -var maxWidthDistributor = func(column []chan int) { +func maxWidthDistributor(column []chan int) { var maxWidth int for _, ch := range column { if w := <-ch; w > maxWidth { diff --git a/progress_test.go b/progress_test.go index bf745ac..122d3cb 100644 --- a/progress_test.go +++ b/progress_test.go @@ -131,7 +131,7 @@ ready := make(chan struct{}) start := make(chan struct{}) end := make(chan struct{}) - *mpb.MaxWidthDistributor = makeWrapper(*mpb.MaxWidthDistributor, start, end) + mpb.MaxWidthDistributor = makeWrapper(mpb.MaxWidthDistributor, start, end) total := 80 numBars := 6