diff --git a/_examples/quietMode/main.go b/_examples/quietMode/main.go index 658fbbe..1ae1bd4 100644 --- a/_examples/quietMode/main.go +++ b/_examples/quietMode/main.go @@ -3,6 +3,7 @@ import ( "flag" "fmt" + "io" "math/rand" "sync" "time" @@ -23,14 +24,7 @@ // passed wg will be accounted at p.Wait() call p := mpb.New( mpb.WithWaitGroup(&wg), - mpb.ContainerOptional( - // setting to nil will: - // set output to ioutil.Discard and disable refresh rate cycle, in - // order not to consume much CPU. Hovewer a single refresh still will - // be triggered on bar complete event, per each bar. - mpb.WithOutput(nil), - quietMode, - ), + mpb.ContainerOptional(mpb.WithOutput(io.Discard), quietMode), ) total, numBars := 100, 3 wg.Add(numBars)