walk walks recursively the bolt database db, calling walkFn for each key it finds.
(db *DB, walkFn walkFunc)
| 89 | |
| 90 | // walk walks recursively the bolt database db, calling walkFn for each key it finds. |
| 91 | func walk(db *DB, walkFn walkFunc) error { |
| 92 | return db.View(func(tx *Tx) error { |
| 93 | return tx.ForEach(func(name []byte, b *Bucket) error { |
| 94 | return walkBucket(b, nil, name, nil, b.Sequence(), walkFn) |
| 95 | }) |
| 96 | }) |
| 97 | } |
| 98 | |
| 99 | func walkBucket(b *Bucket, keypath [][]byte, k, v []byte, seq uint64, fn walkFunc) error { |
| 100 | // Execute callback. |
no test coverage detected