Skip to content

Commit af4d898

Browse files
committed
fixup! satisfy ST1012
1 parent 77a0569 commit af4d898

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

_examples/progressAsWriter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func main() {
2626
for {
2727
select {
2828
case <-done:
29-
// after done, underlying io.Writer returns mpb.DoneError
29+
// after done, underlying io.Writer returns mpb.ErrDone
3030
// so following isn't printed
3131
log.Println("all done")
3232
return

progress.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (p *Progress) MustAdd(total int64, filler BarFiller, options ...BarOption)
149149
// Add creates a bar which renders itself by provided BarFiller.
150150
// If `total <= 0` triggering complete event by increment methods
151151
// is disabled. If called after `(*Progress).Wait()` then
152-
// `(nil, DoneError)` is returned.
152+
// `(nil, ErrDone)` is returned.
153153
func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Bar, error) {
154154
if filler == nil {
155155
filler = NopStyle().Build()
@@ -205,8 +205,7 @@ func (p *Progress) UpdateBarPriority(b *Bar, priority int, lazy bool) {
205205
// Write is implementation of io.Writer.
206206
// Writing to `*Progress` will print lines above a running bar.
207207
// Writes aren't flushed immediately, but at next refresh cycle.
208-
// If called after `(*Progress).Wait()` then `(0, DoneError)`
209-
// is returned.
208+
// If called after `(*Progress).Wait()` then `(0, ErrDone)` is returned.
210209
func (p *Progress) Write(b []byte) (int, error) {
211210
type result struct {
212211
n int

0 commit comments

Comments
 (0)