summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-02 00:10:35 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-02 00:10:35 -0700
commit4de65aa8ba77b10f847e0436bc624da3c39fe5d7 (patch)
tree6cfc44395ffbc872da3e82e6f940b6bd9cca55ac
parent01040a704ebf4ba3e856c1e18e0bb8487776ed65 (diff)
reassigning k, v with next or prev record
-rw-r--r--system/db/content.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/db/content.go b/system/db/content.go
index 3e22a68..a3a4da1 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -240,7 +240,7 @@ func Query(namespace string, opts QueryOptions) [][]byte {
cur := 0 // count of where cursor is
switch opts.Order {
case "asc":
- for k, v := c.Last(); k != nil; c.Prev() {
+ for k, v := c.Last(); k != nil; k, v = c.Prev() {
if cur < end {
cur++
continue
@@ -260,7 +260,7 @@ func Query(namespace string, opts QueryOptions) [][]byte {
}
case "desc":
- for k, v := c.First(); k != nil; c.Next() {
+ for k, v := c.First(); k != nil; k, v = c.Next() {
if cur < start {
cur++
continue