Skip to content

Commit 0396136

Browse files
committed
remove print
1 parent 07990a0 commit 0396136

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

coderd/oauthpki/oidcpki.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ func (src *jwtTokenSource) Token() (*oauth2.Token, error) {
180180
}
181181
cli := http.DefaultClient
182182
if v, ok := src.ctx.Value(oauth2.HTTPClient).(*http.Client); ok {
183+
// This client should be the instrumented client already. So no need to
184+
// handle this manually.
183185
cli = v
184186
}
185187

coderd/promoauth/oauth2.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,6 @@ func (i *instrumentedTripper) RoundTrip(r *http.Request) (*http.Response, error)
160160
"source": i.source,
161161
"status_code": fmt.Sprintf("%d", statusCode),
162162
}).Inc()
163-
if err == nil {
164-
fmt.Println(map[string]string{
165-
"limit": resp.Header.Get("x-ratelimit-limit"),
166-
"remain": resp.Header.Get("x-ratelimit-remaining"),
167-
"used": resp.Header.Get("x-ratelimit-used"),
168-
"reset": resp.Header.Get("x-ratelimit-reset"),
169-
"resource": resp.Header.Get("x-ratelimit-resource"),
170-
})
171-
}
163+
172164
return resp, err
173165
}

0 commit comments

Comments
 (0)