aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/buckets.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-04-07 16:24:51 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-04-11 12:36:54 -0600
commit698b07b074dc554578ecddd138972702f46d0879 (patch)
treef171f10bd4f17986cb9120d71263995b28273a7a /cmd/bolt/buckets.go
parentUpdate cursor benchmark. (diff)
downloaddedo-698b07b074dc554578ecddd138972702f46d0879.tar.gz
dedo-698b07b074dc554578ecddd138972702f46d0879.tar.xz
Add nested buckets.
This commit adds the ability to create buckets inside of other buckets. It also replaces the buckets page with a root bucket. Fixes #56.
Diffstat (limited to 'cmd/bolt/buckets.go')
-rw-r--r--cmd/bolt/buckets.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/bolt/buckets.go b/cmd/bolt/buckets.go
index 10766a6..48395d8 100644
--- a/cmd/bolt/buckets.go
+++ b/cmd/bolt/buckets.go
@@ -21,10 +21,10 @@ func Buckets(path string) {
defer db.Close()
err = db.View(func(tx *bolt.Tx) error {
- for _, b := range tx.Buckets() {
- println(b.Name())
- }
- return nil
+ return tx.ForEach(func(name []byte, _ *bolt.Bucket) error {
+ println(string(name))
+ return nil
+ })
})
if err != nil {
fatal(err)