Skip to content

Commit

Permalink
updated cleveldb Iterator API docs to conform to the changes made in #…
Browse files Browse the repository at this point in the history
  • Loading branch information
alesforz committed Aug 9, 2024
1 parent c1d9bc8 commit d64f2bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cleveldb_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ func (itr cLevelDBIterator) Valid() bool {
}

// Key implements Iterator.
// The caller should not modify the contents of the returned slice.
// Instead, the caller should make a copy and work on the copy.
func (itr cLevelDBIterator) Key() []byte {
itr.assertIsValid()
return itr.source.Key()
}

// Value implements Iterator.
// The caller should not modify the contents of the returned slice.
// Instead, the caller should make a copy and work on the copy.
func (itr cLevelDBIterator) Value() []byte {
itr.assertIsValid()
return itr.source.Value()
Expand Down

0 comments on commit d64f2bb

Please sign in to comment.