From 698b07b074dc554578ecddd138972702f46d0879 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Mon, 7 Apr 2014 16:24:51 -0600 Subject: 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. --- cmd/bolt/buckets.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmd/bolt/buckets.go') 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) -- cgit v1.2.3