mirror of https://github.com/etcd-io/bbolt.git
Cursor.Seek validity is indicated by key being nil
parent
60624c4c19
commit
458400eb82
|
@ -112,7 +112,7 @@ func (c *Cursor) Prev() (key []byte, value []byte) {
|
||||||
|
|
||||||
// Seek moves the cursor to a given key and returns it.
|
// Seek moves the cursor to a given key and returns it.
|
||||||
// If the key does not exist then the next key is used. If no keys
|
// If the key does not exist then the next key is used. If no keys
|
||||||
// follow, a nil value is returned.
|
// follow, a nil key is returned.
|
||||||
func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) {
|
func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) {
|
||||||
k, v, flags := c.seek(seek)
|
k, v, flags := c.seek(seek)
|
||||||
if k == nil {
|
if k == nil {
|
||||||
|
|
Loading…
Reference in New Issue