Fix reverse listing in bolt

master
Bel LaPointe 2018-10-11 15:27:33 -06:00
parent b5a6d24f7d
commit c0b6d70899
1 changed files with 2 additions and 2 deletions

View File

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