]> Cypherpunks.ru repositories - gostls13.git/commitdiff
context: canceLLation
authorRuss Cox <rsc@golang.org>
Wed, 23 Nov 2022 22:42:01 +0000 (17:42 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 28 Nov 2022 14:42:55 +0000 (14:42 +0000)
Fixes post-review comment on CL 375977.

Change-Id: If7117fd7b505670eb676a73d991917505bc18a4b
Reviewed-on: https://go-review.googlesource.com/c/go/+/453296
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>

src/context/context.go

index a0b5edc524a86a15ce917892879354df8e095fa7..f39abe91e2cd06407b4443bf05434c95917f57dd 100644 (file)
@@ -23,7 +23,7 @@
 // control-flow paths.
 //
 // The WithCancelCause function returns a CancelCauseFunc, which
-// takes an error and records it as the cancelation cause. Calling
+// takes an error and records it as the cancellation cause. Calling
 // Cause on the canceled context or any of its children retrieves
 // the cause. If no cause is specified, Cause(ctx) returns the same
 // value as ctx.Err().
@@ -240,7 +240,7 @@ func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
        return c, func() { c.cancel(true, Canceled, nil) }
 }
 
-// A CancelCauseFunc behaves like a CancelFunc but additionally sets the cancelation cause.
+// A CancelCauseFunc behaves like a CancelFunc but additionally sets the cancellation cause.
 // This cause can be retrieved by calling Cause on the canceled Context or on
 // any of its derived Contexts.
 //
@@ -278,8 +278,8 @@ func withCancel(parent Context) *cancelCtx {
 }
 
 // Cause returns a non-nil error explaining why c was canceled.
-// The first cancelation of c or one of its parents sets the cause.
-// If that cancelation happened via a call to CancelCauseFunc(err),
+// The first cancellation of c or one of its parents sets the cause.
+// If that cancellation happened via a call to CancelCauseFunc(err),
 // then Cause returns err.
 // Otherwise Cause(c) returns the same value as c.Err().
 // Cause returns nil if c has not been canceled yet.