TestWithContext discard output
Vladimir Bauer
3 years ago
| 20 | 20 |
shutdown := make(chan interface{})
|
| 21 | 21 |
ctx, cancel := context.WithCancel(context.Background())
|
| 22 | 22 |
p := mpb.NewWithContext(ctx,
|
|
23 |
mpb.WithOutput(io.Discard),
|
| 23 | 24 |
mpb.WithShutdownNotifier(shutdown),
|
| 24 | 25 |
)
|
| 25 | 26 |
_ = p.AddBar(0) // never complete bar
|