mirror of
https://github.com/gogrlx/bitcask.git
synced 2026-04-02 02:58:59 -07:00
Add Keys() to exported API (extended API)
This commit is contained in:
@@ -125,6 +125,10 @@ func (b *Bitcask) Scan(prefix string, f func(key string) error) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bitcask) Keys() chan string {
|
||||
return b.keydir.Keys()
|
||||
}
|
||||
|
||||
func (b *Bitcask) Fold(f func(key string) error) error {
|
||||
for key := range b.keydir.Keys() {
|
||||
if err := f(key); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user