aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-20 11:04:46 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-20 11:04:46 -0700
commit2d1f21a40dc0ec42c7f44fd5d0604a3ab9e5474a (patch)
tree205ec52cbf2d856265fc9ded9664e41cf523c4b4
parentUpdate project status. (diff)
downloaddedo-2d1f21a40dc0ec42c7f44fd5d0604a3ab9e5474a.tar.gz
dedo-2d1f21a40dc0ec42c7f44fd5d0604a3ab9e5474a.tar.xz
Fix Cursor godoc for First(), Next(), and Get().
-rw-r--r--cursor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cursor.go b/cursor.go
index 109cffb..3262f4c 100644
--- a/cursor.go
+++ b/cursor.go
@@ -14,7 +14,7 @@ type Cursor struct {
}
// First moves the cursor to the first item in the bucket and returns its key and value.
-// If the bucket is empty then a nil key is returned.
+// If the bucket is empty then a nil key and value are returned.
func (c *Cursor) First() (key []byte, value []byte) {
if len(c.stack) > 0 {
c.stack = c.stack[:0]
@@ -25,7 +25,7 @@ func (c *Cursor) First() (key []byte, value []byte) {
}
// Next moves the cursor to the next item in the bucket and returns its key and value.
-// If the cursor is at the end of the bucket then a nil key returned.
+// If the cursor is at the end of the bucket then a nil key and value are returned.
func (c *Cursor) Next() (key []byte, value []byte) {
// Attempt to move over one element until we're successful.
// Move up the stack as we hit the end of each page in our stack.
@@ -49,7 +49,7 @@ func (c *Cursor) Next() (key []byte, value []byte) {
}
// Get moves the cursor to a given key and returns its value.
-// If the key does not exist then the cursor is left at the closest key and a nil key is returned.
+// If the key does not exist then the cursor is left at the closest key and a nil value is returned.
func (c *Cursor) Get(key []byte) (value []byte) {
// Start from root page and traverse to correct page.
c.stack = c.stack[:0]