code: func (d *downloader) Download(u *url.URL, out writeSyncer) error {
  	client, err := d.Session.Client()
  	if err != nil {
  		return err
  	}
  	req, err := d.Session.Request(u)
  	if err != nil {
  		return err
  	}
  	res, err := client.Do(req)
  	if err != nil {
  		return err
  	}
  	defer res.Body.Close()
  
  	if stopNow, err := d.Session.HandleStatus(res); stopNow || err != nil {
  		return err
  	}
  
  	reader, err := d.Session.BodyReader(res)
  	if err != nil {
  		return err
  	}
  	if _, err := io.Copy(out, reader); err != nil {
  		return errwrap.Wrap(fmt.Errorf("failed to download %q", u.String()), err)
  	}
  
  	if err := out.Sync(); err != nil {
  		return errwrap.Wrap(fmt.Errorf("failed to sync data from %q to disk", u.String()), err)
  	}
  
  	return nil
  }
docs: // Download tries to fetch the passed URL and write the contents into
  // a given writeSyncer instance.