diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-16 09:25:57 -0400 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-16 09:25:57 -0400 |
commit | 184f39b4dc84c31a69be6d163f4b89651424f1b0 (patch) | |
tree | 4d351709b0ec5d5eb1803b59c84e868c07889208 /tx.go | |
parent | Fix race detector CI. (diff) | |
parent | Return bucket from CreateBucket() functions. (diff) | |
download | dedo-184f39b4dc84c31a69be6d163f4b89651424f1b0.tar.gz dedo-184f39b4dc84c31a69be6d163f4b89651424f1b0.tar.xz |
Merge pull request #130 from benbjohnson/create-bucket-api
Return bucket from CreateBucket() functions.
Diffstat (limited to 'tx.go')
-rw-r--r-- | tx.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -88,13 +88,13 @@ func (tx *Tx) Bucket(name []byte) *Bucket { // CreateBucket creates a new bucket. // Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long. -func (tx *Tx) CreateBucket(name []byte) error { +func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) { return tx.root.CreateBucket(name) } // CreateBucketIfNotExists creates a new bucket if it doesn't already exist. // Returns an error if the bucket name is blank, or if the bucket name is too long. -func (tx *Tx) CreateBucketIfNotExists(name []byte) error { +func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { return tx.root.CreateBucketIfNotExists(name) } |