diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-02 00:21:14 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-02 00:21:14 -0700 |
commit | c92042d86c5d4f67ce2304c30c60273f767eb4c0 (patch) | |
tree | 7a75eea644f5056040b2f8d646fcb91ae16514c1 /system/db/content.go | |
parent | d31212d0d147f2e727241005a62ca434c8e8a417 (diff) |
adding test fix for asc order
Diffstat (limited to 'system/db/content.go')
-rw-r--r-- | system/db/content.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/db/content.go b/system/db/content.go index 860f830..a7fbc30 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -237,16 +237,16 @@ func Query(namespace string, opts QueryOptions) [][]byte { } i := 0 // count of num posts added - cur := 0 // count of where cursor is + cur := 0 // count of num cursor moves switch opts.Order { case "asc": for k, v := c.Last(); k != nil; k, v = c.Prev() { - if cur < end { + if cur < start { cur++ continue } - if cur < start { + if cur >= end { break } |