newProgressPool creates a *mpb.Progress. The caller must eventually call pool.Wait() after the pool will no longer be updated. NOTE: Every progress bar created within the progress pool must either successfully complete or be aborted, or pool.Wait() will hang. That is typically done using "defer bar.
()
| 19 | // complete or be aborted, or pool.Wait() will hang. That is typically done |
| 20 | // using "defer bar.Abort(false)", which must be called BEFORE pool.Wait() is called. |
| 21 | func (c *copier) newProgressPool() *mpb.Progress { |
| 22 | return mpb.New(mpb.WithWidth(40), mpb.WithOutput(c.progressOutput)) |
| 23 | } |
| 24 | |
| 25 | // customPartialBlobDecorFunc implements mpb.DecorFunc for the partial blobs retrieval progress bar |
| 26 | func customPartialBlobDecorFunc(s decor.Statistics) string { |
no outgoing calls
no test coverage detected