diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-03-28 16:15:14 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-04-16 20:27:15 +0000 |
commit | 5781df421e721088f3ff6229f0e8d4e4c04765b8 (patch) | |
tree | 4f726e5bca753566c70f9c8d4957697996a9dcf7 /src/context | |
parent | 34b1f210462409f8c05d927a80d973b5692c1d26 (diff) | |
download | go-5781df421e721088f3ff6229f0e8d4e4c04765b8.tar.gz go-5781df421e721088f3ff6229f0e8d4e4c04765b8.zip |
all: s/cancelation/cancellation/
Though there is variation in the spelling of canceled,
cancellation is always spelled with a double l.
Reference: https://www.grammarly.com/blog/canceled-vs-cancelled/
Change-Id: I240f1a297776c8e27e74f3eca566d2bc4c856f2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/170060
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/context.go | 6 | ||||
-rw-r--r-- | src/context/context_test.go | 4 | ||||
-rw-r--r-- | src/context/example_test.go | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/context/context.go b/src/context/context.go index ad67d2301d..93bf5b627d 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package context defines the Context type, which carries deadlines, -// cancelation signals, and other request-scoped values across API boundaries +// cancellation signals, and other request-scoped values across API boundaries // and between processes. // // Incoming requests to a server should create a Context, and outgoing @@ -54,7 +54,7 @@ import ( "time" ) -// A Context carries a deadline, a cancelation signal, and other values across +// A Context carries a deadline, a cancellation signal, and other values across // API boundaries. // // Context's methods may be called by multiple goroutines simultaneously. @@ -92,7 +92,7 @@ type Context interface { // } // // See https://blog.golang.org/pipelines for more examples of how to use - // a Done channel for cancelation. + // a Done channel for cancellation. Done() <-chan struct{} // If Done is not yet closed, Err returns nil. diff --git a/src/context/context_test.go b/src/context/context_test.go index 0cec169915..0e69e2f6fd 100644 --- a/src/context/context_test.go +++ b/src/context/context_test.go @@ -94,7 +94,7 @@ func XTestWithCancel(t testingT) { } cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate + time.Sleep(100 * time.Millisecond) // let cancellation propagate for i, c := range contexts { select { @@ -306,7 +306,7 @@ func XTestCanceledTimeout(t testingT) { o := otherContext{c} c, cancel := WithTimeout(o, 2*time.Second) cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate + time.Sleep(100 * time.Millisecond) // let cancellation propagate select { case <-c.Done(): default: diff --git a/src/context/example_test.go b/src/context/example_test.go index 2b28b57704..b91a8acef3 100644 --- a/src/context/example_test.go +++ b/src/context/example_test.go @@ -59,7 +59,7 @@ func ExampleWithDeadline() { ctx, cancel := context.WithDeadline(context.Background(), d) // Even though ctx will be expired, it is good practice to call its - // cancelation function in any case. Failure to do so may keep the + // cancellation function in any case. Failure to do so may keep the // context and its parent alive longer than necessary. defer cancel() |