Skip to content

Commit 31d17cb

Browse files
committed
Suppress extra logging from the retrying client.
1 parent a24df16 commit 31d17cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/client/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package client
22

33
import (
4+
"io"
5+
"log"
6+
47
"github.com/cli/go-gh"
58
"github.com/cli/go-gh/pkg/api"
69
"github.com/hashicorp/go-retryablehttp"
@@ -10,6 +13,7 @@ import (
1013
func NewClient(host string) (api.RESTClient, error) {
1114
retryableHTTPClient := retryablehttp.NewClient()
1215
retryableHTTPClient.RetryMax = 5
16+
retryableHTTPClient.Logger = log.New(io.Discard, "", log.LstdFlags)
1317
retryableRoundTripper := retryablehttp.RoundTripper{Client: retryableHTTPClient}
1418

1519
client, err := gh.RESTClient(&api.ClientOptions{Host: host, Transport: &retryableRoundTripper})

0 commit comments

Comments
 (0)