From 0bf796c9deeb19564bcd7fc5ded57031fe7ceb57 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Sat, 15 Feb 2014 23:38:03 -0700 Subject: Improve test coverage. --- transaction.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'transaction.go') diff --git a/transaction.go b/transaction.go index 46adefe..739d112 100644 --- a/transaction.go +++ b/transaction.go @@ -63,8 +63,12 @@ func (t *Transaction) Bucket(name string) *Bucket { // Buckets retrieves a list of all buckets. func (t *Transaction) Buckets() []*Bucket { - warn("[pending] Transaction.Buckets()") // TODO - return nil + buckets := make([]*Bucket, 0, len(t.buckets.items)) + for name, b := range t.buckets.items { + bucket := &Bucket{bucket: b, transaction: t, name: name} + buckets = append(buckets, bucket) + } + return buckets } // Cursor creates a cursor associated with a given bucket. -- cgit v1.2.3