diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-02 02:28:01 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-02 02:28:01 -0700 |
commit | 785077c2f136040fa2d14a95c71828cddd802643 (patch) | |
tree | 0d765f90bf0750b31ff7f47f46326cc2fbf9bd49 /system/db/content.go | |
parent | 759506ca799c443402fed9c6413a8b49406e197f (diff) |
adding default to order switch in db.Query
Diffstat (limited to 'system/db/content.go')
-rw-r--r-- | system/db/content.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/system/db/content.go b/system/db/content.go index 714e0c6..cfbd4ef 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -259,7 +259,7 @@ func Query(namespace string, opts QueryOptions) [][]byte { cur++ } - case "desc": + case "desc", "": for k, v := c.First(); k != nil; k, v = c.Next() { if cur < start { cur++ @@ -279,13 +279,6 @@ func Query(namespace string, opts QueryOptions) [][]byte { return nil }) - // if opts.order == "asc" { - // posts = []json.RawMessage{} - // for i := len(posts) - 1; i >= 0; i-- { - // posts = append(all, posts[i]) - // } - // } - return posts } |