fix: update the typo code comment

Kubernetes-commit: d2bab218ddef3fc3f444038420dd500c0e8bc068
This commit is contained in:
saltbo 2022-07-13 10:16:51 +08:00 committed by Kubernetes Publisher
parent eabd4289b0
commit 7c3fa18b11
2 changed files with 4 additions and 4 deletions

View File

@ -892,7 +892,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
done := func() bool {
defer readAndCloseResponseBody(resp)
// if the the server returns an error in err, the response will be nil.
// if the server returns an error in err, the response will be nil.
f := func(req *http.Request, resp *http.Response) {
if resp == nil {
return

View File

@ -2564,7 +2564,7 @@ func TestRequestWatchWithRetry(t *testing.T) {
testRequestWithRetry(t, "Watch", func(ctx context.Context, r *Request) {
w, err := r.Watch(ctx)
if err == nil {
// in this test the the response body returned by the server is always empty,
// in this test the response body returned by the server is always empty,
// this will cause StreamWatcher.receive() to:
// - return an io.EOF to indicate that the watch closed normally and
// - then close the io.Reader