Skip to content

Commit

Permalink
fixup! satisfy ST1012
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Feb 1, 2025
1 parent 77a0569 commit af4d898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _examples/progressAsWriter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit af4d898

Please sign in to comment.