Skip to content

Commit

Permalink
net/http: fix spelling in documentation
Browse files Browse the repository at this point in the history
Change-Id: I8b0924300eafe27de98975512a78a6527a92e446
Reviewed-on: https://go-review.googlesource.com/c/go/+/354729
Reviewed-by: Ian Lance Taylor <[email protected]>
Trust: Damien Neil <[email protected]>
  • Loading branch information
180909 authored and ianlancetaylor committed Nov 7, 2021
1 parent 85493d5 commit 9e6ad46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/net/http/httputil/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/net/http/serve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion src/net/http/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e6ad46

Please sign in to comment.