Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-develope committed Jan 25, 2024
1 parent 7b0b23e commit 003b801
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions db/memdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (db *MemDB) NewBatch() Batch {

// NewBatchWithSize implements DB.
// It does the same thing as NewBatch because we can't pre-allocate memDBBatch
func (db *MemDB) NewBatchWithSize(size int) Batch {
func (db *MemDB) NewBatchWithSize(_ int) Batch {
return newMemDBBatch(db)
}

Expand Down Expand Up @@ -306,8 +306,8 @@ func newMemDBIteratorMtxChoice(db *MemDB, start []byte, end []byte, reverse bool
// Close implements Iterator.
func (i *memDBIterator) Close() error {
i.cancel()
for range i.ch { // drain channel
}
for range i.ch { //nolint:revive
} // drain channel
i.item = nil
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func (e *Exporter) Next() (*ExportNode, error) {
// Close closes the exporter. It is safe to call multiple times.
func (e *Exporter) Close() {
e.cancel()
for range e.ch { // drain channel
}
for range e.ch { //nolint:revive
} // drain channel
if e.tree != nil {
e.tree.ndb.decrVersionReaders(e.tree.version)
}
Expand Down
10 changes: 4 additions & 6 deletions mutable_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ func TestIteratorConcurrency(t *testing.T) {
}(i, j)
}
itr, _ := tree.Iterator(nil, nil, true)
for ; itr.Valid(); itr.Next() {
// do nothing
}
for ; itr.Valid(); itr.Next() { //nolint:revive
} // do nothing
}
wg.Wait()
}
Expand All @@ -107,9 +106,8 @@ func TestNewIteratorConcurrency(t *testing.T) {
require.NoError(t, err)
}(i, j)
}
for ; it.Valid(); it.Next() {
// do nothing
}
for ; it.Valid(); it.Next() { //nolint:revive
} // do nothing
wg.Wait()
}
}
Expand Down

0 comments on commit 003b801

Please sign in to comment.