code: func (d *Deployer) setBuckets(ctx context.Context, storageService *storage.Service) error {
  	projBucket := d.Conf.Project + "-camlistore"
  
  	needBucket := map[string]bool{
  		projBucket: true,
  	}
  
  	buckets, err := storageService.Buckets.List(d.Conf.Project).Do()
  	if err != nil {
  		return fmt.Errorf("error listing buckets: %v", err)
  	}
  	for _, it := range buckets.Items {
  		delete(needBucket, it.Name)
  	}
  	if len(needBucket) > 0 {
  		if Verbose {
  			d.Printf("Need to create buckets: %v", needBucket)
  		}
  		var waitBucket sync.WaitGroup
  		var bucketErr error
  		for name := range needBucket {
  			select {
  			case <-ctx.Done():
  				return ctx.Err()
  			default:
  			}
  			name := name
  			waitBucket.Add(1)
  			go func() {
  				defer waitBucket.Done()
  				if Verbose {
  					d.Printf("Creating bucket %s", name)
  				}
  				b, err := storageService.Buckets.Insert(d.Conf.Project, &storage.Bucket{
  					Id:   name,
  					Name: name,
  				}).Do()
  				if err != nil && bucketErr == nil {
  					bucketErr = fmt.Errorf("error creating bucket %s: %v", name, err)
  					return
  				}
  				if Verbose {
  					d.Printf("Created bucket %s: %+v", name, b)
  				}
  			}()
  		}
  		waitBucket.Wait()
  		if bucketErr != nil {
  			return bucketErr
  		}
  	}
  
  	d.Conf.configDir = path.Join(projBucket, configDir)
  	d.Conf.blobDir = path.Join(projBucket, "blobs")
  	return nil
  }
docs: // setBuckets defines the buckets needed by the instance and creates them.