code: func (service *GCSService) WriteObject(ctx context.Context, params GCSObjectParams, r io.Reader) (int64, error) {
  	obj := service.Client.Bucket(params.Bucket).Object(params.ID)
  
  	w := obj.NewWriter(ctx)
  
  	n, err := io.Copy(w, r)
  	if err != nil {
  		return 0, err
  	}
  
  	err = w.Close()
  	if err != nil {
  		if gErr, ok := err.(*googleapi.Error); ok && gErr.Code == 404 {
  			return 0, fmt.Errorf("gcsstore: the bucket %s could not be found while trying to write an object", params.Bucket)
  		}
  		return 0, err
  	}
  
  	return n, err
  }
docs: // Write object writes the file set out by the GCSObjectParams