Skip to content

Commit

Permalink
refactor ToReader
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Aug 23, 2024
1 parent b661fe2 commit 1e03a2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/badger/operation/reader_batch_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ func NewReaderBatchWriter(db *badger.DB) *ReaderBatchWriter {
}

// ToReader is a helper function to convert a *badger.DB to a Reader
var ToReader = NewReaderBatchWriter
func ToReader(db *badger.DB) storage.Reader {
return NewReaderBatchWriter(db)
}

var _ storage.Reader = (*ReaderBatchWriter)(nil)

Expand Down

0 comments on commit 1e03a2d

Please sign in to comment.