Skip to content

Commit 94578ef

Browse files
committed
chore: improve DownloadReleaseAsset documentation
This improves `RepositoriesService.DownloadReleaseAsset` documentation to be a bit more specific and accurate, as per: google#3081 (comment) Signed-off-by: Mike Ball <[email protected]>
1 parent cd05a32 commit 94578ef

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎github/repos_releases.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo s
333333
// of the io.ReadCloser. Exactly one of rc and redirectURL will be zero.
334334
//
335335
// followRedirectsClient can be passed to download the asset from a redirected
336-
// location. Passing http.DefaultClient is recommended unless special circumstances
337-
// exist, but it's possible to pass any http.Client. If nil is passed the
338-
// redirectURL will be returned instead.
336+
// location. Specifying any http.Client is possible, but passing http.DefaultClient
337+
// is recommended, except when the specified repository is private, in which case
338+
// it's necessary to pass an http.Client that performs authenticated requests.
339+
// If nil is passed the redirectURL will be returned instead.
339340
//
340341
// GitHub API docs: https://docs.github.com/rest/releases/assets#get-a-release-asset
341342
//

0 commit comments

Comments
 (0)