code: func (s *RepositoriesService) DownloadContents(ctx context.Context, owner, repo, filepath string, opt *RepositoryContentGetOptions) (io.ReadCloser, error) {
  	dir := path.Dir(filepath)
  	filename := path.Base(filepath)
  	_, dirContents, _, err := s.GetContents(ctx, owner, repo, dir, opt)
  	if err != nil {
  		return nil, err
  	}
  	for _, contents := range dirContents {
  		if *contents.Name == filename {
  			if contents.DownloadURL == nil || *contents.DownloadURL == "" {
  				return nil, fmt.Errorf("No download link found for %s", filepath)
  			}
  			resp, err := s.client.client.Get(*contents.DownloadURL)
  			if err != nil {
  				return nil, err
  			}
  			return resp.Body, nil
  		}
  	}
  	return nil, fmt.Errorf("No file named %s found in %s", filename, dir)
  }
docs: // DownloadContents returns an io.ReadCloser that reads the contents of the
  // specified file. This function will work with files of any size, as opposed
  // to GetContents which is limited to 1 Mb files. It is the caller's
  // responsibility to close the ReadCloser.