remove unedded atomic call ( protected by a lock )

This commit is contained in:
Adrien Delorme 2018-10-15 15:28:08 +02:00
parent 56ccba86c7
commit 4cae413a29
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import (
"fmt"
"io"
"sync"
"sync/atomic"
"github.com/cheggaaa/pb"
)
@ -78,7 +77,7 @@ func (spb *StackableProgressBar) NewProxyReader(r io.Reader) io.Reader {
}
func (spb *StackableProgressBar) prefix() {
spb.Bar.ProgressBar.Prefix(fmt.Sprintf("%d items: ", atomic.LoadInt32(&spb.items)))
spb.Bar.ProgressBar.Prefix(fmt.Sprintf("%d items: ", spb.items))
}
func (spb *StackableProgressBar) Finish() {