code: func WritePackfileToObjectStorage(
  	sw storer.PackfileWriter,
  	packfile io.Reader,
  ) (err error) {
  	w, err := sw.PackfileWriter()
  	if err != nil {
  		return err
  	}
  
  	defer ioutil.CheckClose(w, &err)
  
  	var n int64
  	n, err = io.Copy(w, packfile)
  	if err == nil && n == 0 {
  		return ErrEmptyPackfile
  	}
  
  	return err
  }
docs: // WritePackfileToObjectStorage writes all the packfile objects into the given
  // object storage.