@@ -76,12 +76,12 @@ type DB interface {
7676 Stats () map [string ]string
7777}
7878
79- // BatchI represents a group of writes. They may or may not be written atomically depending on the
79+ // Batch represents a group of writes. They may or may not be written atomically depending on the
8080// backend. Callers must call Close on the batch when done.
8181//
8282// As with DB, given keys and values should be considered read-only, and must not be modified after
8383// passing them to the batch.
84- type BatchI interface {
84+ type Batch = interface {
8585 // Set sets a key/value pair.
8686 // CONTRACT: key, value readonly []byte
8787 Set (key , value []byte ) error
@@ -107,9 +107,7 @@ type BatchI interface {
107107 GetByteSize () (int , error )
108108}
109109
110- type Batch = BatchI
111-
112- // IteratorI represents an iterator over a domain of keys. Callers must call Close when done.
110+ // Iterator represents an iterator over a domain of keys. Callers must call Close when done.
113111// No writes can happen to a domain while there exists an iterator over it, some backends may take
114112// out database locks to ensure this will not happen.
115113//
@@ -132,7 +130,7 @@ type Batch = BatchI
132130// if err := itr.Error(); err != nil {
133131// ...
134132// }
135- type IteratorI interface {
133+ type Iterator = interface {
136134 // Domain returns the start (inclusive) and end (exclusive) limits of the iterator.
137135 // CONTRACT: start, end readonly []byte
138136 Domain () (start , end []byte )
@@ -159,5 +157,3 @@ type IteratorI interface {
159157 // Close closes the iterator, relasing any allocated resources.
160158 Close () error
161159}
162-
163- type Iterator = IteratorI
0 commit comments