From af4d898d1acfca967dccdeae2ee240bedfe1bfd3 Mon Sep 17 00:00:00 2001 From: Vladimir Bauer Date: Sun, 2 Feb 2025 04:52:13 +0500 Subject: [PATCH] fixup! satisfy ST1012 --- _examples/progressAsWriter/main.go | 2 +- progress.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/_examples/progressAsWriter/main.go b/_examples/progressAsWriter/main.go index 057ad032..f358e434 100644 --- a/_examples/progressAsWriter/main.go +++ b/_examples/progressAsWriter/main.go @@ -26,7 +26,7 @@ func main() { for { select { case <-done: - // after done, underlying io.Writer returns mpb.DoneError + // after done, underlying io.Writer returns mpb.ErrDone // so following isn't printed log.Println("all done") return diff --git a/progress.go b/progress.go index 2b12f650..8808ad74 100644 --- a/progress.go +++ b/progress.go @@ -149,7 +149,7 @@ func (p *Progress) MustAdd(total int64, filler BarFiller, options ...BarOption) // Add creates a bar which renders itself by provided BarFiller. // If `total <= 0` triggering complete event by increment methods // is disabled. If called after `(*Progress).Wait()` then -// `(nil, DoneError)` is returned. +// `(nil, ErrDone)` is returned. func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Bar, error) { if filler == nil { filler = NopStyle().Build() @@ -205,8 +205,7 @@ func (p *Progress) UpdateBarPriority(b *Bar, priority int, lazy bool) { // Write is implementation of io.Writer. // Writing to `*Progress` will print lines above a running bar. // Writes aren't flushed immediately, but at next refresh cycle. -// If called after `(*Progress).Wait()` then `(0, DoneError)` -// is returned. +// If called after `(*Progress).Wait()` then `(0, ErrDone)` is returned. func (p *Progress) Write(b []byte) (int, error) { type result struct { n int