Skip to content

Commit dcb8be0

Browse files
chore: fix linter errors (#733)
1 parent 11cde5c commit dcb8be0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/commands/storage/import.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ func ImportCommand() commands.Command {
3939

4040
type readerCounter struct {
4141
source io.Reader
42-
read int64
42+
read atomic.Int64
4343
}
4444

4545
// Read implements io.Reader
4646
func (s *readerCounter) Read(p []byte) (n int, err error) {
4747
n, err = s.source.Read(p)
48-
atomic.AddInt64(&s.read, int64(n))
48+
s.read.Add(int64(n))
4949
return n, err
5050
}
5151

5252
func (s *readerCounter) counter() int {
53-
return int(atomic.LoadInt64(&s.read))
53+
return int(s.read.Load())
5454
}
5555

5656
type importCommand struct {

0 commit comments

Comments
 (0)