From 94578ef597b6f661d4034c5fddf61e513697920d Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Tue, 17 Dec 2024 08:56:41 -0500 Subject: [PATCH] chore: improve DownloadReleaseAsset documentation This improves `RepositoriesService.DownloadReleaseAsset` documentation to be a bit more specific and accurate, as per: https://github.com/google/go-github/issues/3081#issuecomment-1972467566 Signed-off-by: Mike Ball --- github/repos_releases.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/github/repos_releases.go b/github/repos_releases.go index 9014e3628af..6023f632716 100644 --- a/github/repos_releases.go +++ b/github/repos_releases.go @@ -333,9 +333,10 @@ func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo s // of the io.ReadCloser. Exactly one of rc and redirectURL will be zero. // // followRedirectsClient can be passed to download the asset from a redirected -// location. Passing http.DefaultClient is recommended unless special circumstances -// exist, but it's possible to pass any http.Client. If nil is passed the -// redirectURL will be returned instead. +// location. Specifying any http.Client is possible, but passing http.DefaultClient +// is recommended, except when the specified repository is private, in which case +// it's necessary to pass an http.Client that performs authenticated requests. +// If nil is passed the redirectURL will be returned instead. // // GitHub API docs: https://docs.github.com/rest/releases/assets#get-a-release-asset //