bolthelper.go
func (tx Tx) CreateBucketIfNotExists(folders [][]byte) (Bucket, error) {
	b, err := tx.Tx.CreateBucketIfNotExists(folders[0])
	if err != nil {
		return Bucket{}, nil
	}
	if len(folders) == 1 {
		return Bucket{b}, nil
	}
	return Bucket{b}.CreateBucketIfNotExists(folders[1:])
}
func (tx Tx) CreateBucketIfNotExists(folders [][]byte) (Bucket, error) {
	b, err := tx.Tx.CreateBucketIfNotExists(folders[0])
	if err != nil {
		return Bucket{}, nil
	}
	if len(folders) == 1 {
		return Bucket{b}, nil
	}
	return Bucket{b}.CreateBucketIfNotExists(folders[1:])
}
func ( tx Tx ) CreateBucketIfNotExists ( folders [ ] [ ] byte ) ( Bucket , error ) { b , err := tx . Tx . CreateBucketIfNotExists ( folders [ 0 ] ) if err != nil { return Bucket { } , nil } if len ( folders ) == 1 { return Bucket { b } , nil } return Bucket { b } . CreateBucketIfNotExists ( folders [ 1 : ] ) }
// 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. The bucket instance is only valid for the lifetime of
// the transaction.
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 . The bucket instance is only valid for the lifetime of the transaction .