Skip to content

Commit

Permalink
make a type alias in DB interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-develope committed Aug 29, 2024
1 parent e75f6e4 commit 2ebb354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type DB interface {
//
// As with DB, given keys and values should be considered read-only, and must not be modified after
// passing them to the batch.
type Batch interface {
type Batch = interface {
// Set sets a key/value pair.
// CONTRACT: key, value readonly []byte
Set(key, value []byte) error
Expand Down Expand Up @@ -130,7 +130,7 @@ type Batch interface {
// if err := itr.Error(); err != nil {
// ...
// }
type Iterator interface {
type Iterator = interface {
// Domain returns the start (inclusive) and end (exclusive) limits of the iterator.
// CONTRACT: start, end readonly []byte
Domain() (start []byte, end []byte)
Expand Down

0 comments on commit 2ebb354

Please sign in to comment.