Fix reverse boltdb list and tests

This commit is contained in:
Bel LaPointe
2018-10-11 08:19:49 -06:00
parent c4d3b24e5c
commit c32ef6c099
4 changed files with 14 additions and 9 deletions

View File

@@ -48,7 +48,8 @@ func (bc *BoltClient) List(namespace, key string, asc bool, limit int) ([]string
found = append(found, string(k))
}
} else {
for k, _ := c.Seek([]byte(key)); k != nil && len(found) < limit; k, _ = c.Next() {
key += "}}}}}}}}}}}}}}}}}}}}}}}}}}}}}"
for k, _ := c.Seek([]byte(key)); k != nil && len(found) < limit; k, _ = c.Prev() {
found = append(found, string(k))
}
}