Fix reverse listing in bolt

This commit is contained in:
Bel LaPointe
2018-10-11 15:27:33 -06:00
parent b5a6d24f7d
commit c0b6d70899

View File

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