Codebase list golang-github-vbauerster-mpb / fa9a892
use ContainerOptional Vladimir Bauer 5 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2222 // pass &wg (optional), so p will wait for it eventually
2323 p := mpb.New(
2424 mpb.WithWaitGroup(&wg),
25 mpb.ContainerOptOn(
25 mpb.ContainerOptional(
2626 // setting to nil will:
27 // set output to ioutil.Discard and disable internal refresh rate
28 // cycling, in order to not consume much CPU, hovewer a single refresh
29 // still will be triggered on bar complete event, per each bar.
27 // set output to ioutil.Discard and disable refresh rate cycle, in
28 // order not to consume much CPU. Hovewer a single refresh still will
29 // be triggered on bar complete event, per each bar.
3030 mpb.WithOutput(nil),
31 func() bool { return quietMode },
31 quietMode,
3232 ),
3333 )
3434 total, numBars := 100, 3