]> Cypherpunks.ru repositories - gostls13.git/commitdiff
net/http: fix spelling in documentation
authorjiahua wang <wjh180909@gmail.com>
Fri, 8 Oct 2021 01:59:15 +0000 (09:59 +0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 7 Nov 2021 04:57:22 +0000 (04:57 +0000)
Change-Id: I8b0924300eafe27de98975512a78a6527a92e446
Reviewed-on: https://go-review.googlesource.com/c/go/+/354729
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Damien Neil <dneil@google.com>

src/net/http/httputil/dump.go
src/net/http/serve_test.go
src/net/http/transfer.go

index 2948f27e5d5c58b4b93a7b3452b56b7062264406..d7baecd9c17b3d2d14a6faef879c045c774b11b4 100644 (file)
@@ -292,7 +292,7 @@ func DumpRequest(req *http.Request, body bool) ([]byte, error) {
 // can detect that the lack of body was intentional.
 var errNoBody = errors.New("sentinel error value")
 
-// failureToReadBody is a io.ReadCloser that just returns errNoBody on
+// failureToReadBody is an io.ReadCloser that just returns errNoBody on
 // Read. It's swapped in when we don't actually want to consume
 // the body, but need a non-nil one, and want to distinguish the
 // error from reading the dummy body.
index e8fb77446c3d45668dcfda36026971abe21c49ac..27dff2bf458d899e5ef0c1c4bd1c77be7b079113 100644 (file)
@@ -6557,7 +6557,7 @@ func TestDisableKeepAliveUpgrade(t *testing.T) {
 
        rwc, ok := resp.Body.(io.ReadWriteCloser)
        if !ok {
-               t.Fatalf("Response.Body is not a io.ReadWriteCloser: %T", resp.Body)
+               t.Fatalf("Response.Body is not an io.ReadWriteCloser: %T", resp.Body)
        }
 
        _, err = rwc.Write([]byte("hello"))
index 5ff89cc17f10cbd83a0dfcd8da9455f0ef54ae68..2be1c9fa3cc1ceb0b94da1c5fbc52733aa50d385 100644 (file)
@@ -1030,7 +1030,7 @@ func (b *body) registerOnHitEOF(fn func()) {
        b.onHitEOF = fn
 }
 
-// bodyLocked is a io.Reader reading from a *body when its mutex is
+// bodyLocked is an io.Reader reading from a *body when its mutex is
 // already held.
 type bodyLocked struct {
        b *body