code: func (s *RepositoriesService) GetArchiveLink(ctx context.Context, owner, repo string, archiveformat archiveFormat, opt *RepositoryContentGetOptions) (*url.URL, *Response, error) {
  	u := fmt.Sprintf("repos/%s/%s/%s", owner, repo, archiveformat)
  	if opt != nil && opt.Ref != "" {
  		u += fmt.Sprintf("/%s", opt.Ref)
  	}
  	req, err := s.client.NewRequest("GET", u, nil)
  	if err != nil {
  		return nil, nil, err
  	}
  	var resp *http.Response
  	// Use http.DefaultTransport if no custom Transport is configured
  	req = withContext(ctx, req)
  	if s.client.client.Transport == nil {
  		resp, err = http.DefaultTransport.RoundTrip(req)
  	} else {
  		resp, err = s.client.client.Transport.RoundTrip(req)
  	}
  	if err != nil {
  		return nil, nil, err
  	}
  	resp.Body.Close()
  	if resp.StatusCode != http.StatusFound {
  		return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status)
  	}
  	parsedURL, err := url.Parse(resp.Header.Get("Location"))
  	return parsedURL, newResponse(resp), err
  }
docs: // GetArchiveLink returns an URL to download a tarball or zipball archive for a
  // repository. The archiveFormat can be specified by either the github.Tarball
  // or github.Zipball constant.
  //
  // GitHub API docs: https://developer.github.com/v3/repos/contents/#get-archive-link