From 52bf14e0e8bdcd73f1ddfb0c4a1d0200097d3ba2 Mon Sep 17 00:00:00 2001 From: Naman Gera Date: Fri, 9 Apr 2021 03:48:14 +0000 Subject: all: fix spellings This follows the spelling choices that the Go project has made for English words. https://github.com/golang/go/wiki/Spelling Change-Id: Ie7c586d2cf23020cb492cfff58c0831d2d8d3a78 GitHub-Last-Rev: e16a32cd225a275f73d236bcb33703986d110ded GitHub-Pull-Request: golang/go#45442 Reviewed-on: https://go-review.googlesource.com/c/go/+/308291 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Trust: Emmanuel Odeke --- src/net/http/client_test.go | 2 +- src/net/http/httputil/dump_test.go | 2 +- src/net/http/httputil/reverseproxy.go | 2 +- src/net/http/pprof/pprof.go | 2 +- src/net/http/transport.go | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/net/http') diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go index 3b3d98ff9a..01d605c351 100644 --- a/src/net/http/client_test.go +++ b/src/net/http/client_test.go @@ -1945,7 +1945,7 @@ func TestClientDoCanceledVsTimeout_h2(t *testing.T) { } // Issue 33545: lock-in the behavior promised by Client.Do's -// docs about request cancelation vs timing out. +// docs about request cancellation vs timing out. func testClientDoCanceledVsTimeout(t *testing.T, h2 bool) { defer afterTest(t) cst := newClientServerTest(t, h2, HandlerFunc(func(w ResponseWriter, r *Request) { diff --git a/src/net/http/httputil/dump_test.go b/src/net/http/httputil/dump_test.go index 8168b2ebc0..366cc8239a 100644 --- a/src/net/http/httputil/dump_test.go +++ b/src/net/http/httputil/dump_test.go @@ -478,7 +478,7 @@ func TestDumpResponse(t *testing.T) { } } -// Issue 38352: Check for deadlock on cancelled requests. +// Issue 38352: Check for deadlock on canceled requests. func TestDumpRequestOutIssue38352(t *testing.T) { if testing.Short() { return diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go index 4e369580ea..db42ac6ba5 100644 --- a/src/net/http/httputil/reverseproxy.go +++ b/src/net/http/httputil/reverseproxy.go @@ -562,7 +562,7 @@ func (p *ReverseProxy) handleUpgradeResponse(rw http.ResponseWriter, req *http.R backConnCloseCh := make(chan bool) go func() { - // Ensure that the cancelation of a request closes the backend. + // Ensure that the cancellation of a request closes the backend. // See issue https://golang.org/issue/35559. select { case <-req.Context().Done(): diff --git a/src/net/http/pprof/pprof.go b/src/net/http/pprof/pprof.go index a854fef5d3..888ea35c9a 100644 --- a/src/net/http/pprof/pprof.go +++ b/src/net/http/pprof/pprof.go @@ -287,7 +287,7 @@ func (name handler) serveDeltaProfile(w http.ResponseWriter, r *http.Request, p err := r.Context().Err() if err == context.DeadlineExceeded { serveError(w, http.StatusRequestTimeout, err.Error()) - } else { // TODO: what's a good status code for cancelled requests? 400? + } else { // TODO: what's a good status code for canceled requests? 400? serveError(w, http.StatusInternalServerError, err.Error()) } return diff --git a/src/net/http/transport.go b/src/net/http/transport.go index f30ca881ac..57018d2392 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -1187,7 +1187,7 @@ type wantConn struct { // hooks for testing to know when dials are done // beforeDial is called in the getConn goroutine when the dial is queued. - // afterDial is called when the dial is completed or cancelled. + // afterDial is called when the dial is completed or canceled. beforeDial func() afterDial func() @@ -1375,7 +1375,7 @@ func (t *Transport) getConn(treq *transportRequest, cm connectMethod) (pc *persi trace.GotConn(httptrace.GotConnInfo{Conn: w.pc.conn, Reused: w.pc.isReused()}) } if w.err != nil { - // If the request has been cancelled, that's probably + // If the request has been canceled, that's probably // what caused w.err; if so, prefer to return the // cancellation error (see golang.org/issue/16049). select { @@ -1437,7 +1437,7 @@ func (t *Transport) queueForDial(w *wantConn) { // dialConnFor dials on behalf of w and delivers the result to w. // dialConnFor has received permission to dial w.cm and is counted in t.connCount[w.cm.key()]. -// If the dial is cancelled or unsuccessful, dialConnFor decrements t.connCount[w.cm.key()]. +// If the dial is canceled or unsuccessful, dialConnFor decrements t.connCount[w.cm.key()]. func (t *Transport) dialConnFor(w *wantConn) { defer w.afterDial() -- cgit v1.3-5-g9baa