diff --git a/progress.go b/progress.go index 9c4c47dc5..c84b91640 100644 --- a/progress.go +++ b/progress.go @@ -42,14 +42,10 @@ func NewProgress(d time.Duration) *Progress { // Start runs resets and runs the progress reporter. func (p *Progress) Start() { - if p == nil { + if p == nil || p.running { return } - if p.running { - panic("truing to reset a running Progress") - } - p.o = sync.Once{} p.cancel = make(chan struct{}) p.running = true @@ -135,14 +131,10 @@ func (p *Progress) Reset() { // Done closes the progress report. func (p *Progress) Done() { - if p == nil { + if p == nil || !p.running { return } - if !p.running { - panic("Done() called on non-running Progress") - } - if p.running { p.running = false p.o.Do(func() {