From: Russ Cox Date: Wed, 23 Nov 2022 22:42:01 +0000 (-0500) Subject: context: canceLLation X-Git-Tag: go1.20rc1~83 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e79a4f71b7af648ef594f824951800ccc555d727;p=gostls13.git context: canceLLation Fixes post-review comment on CL 375977. Change-Id: If7117fd7b505670eb676a73d991917505bc18a4b Reviewed-on: https://go-review.googlesource.com/c/go/+/453296 TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Run-TryBot: Russ Cox --- diff --git a/src/context/context.go b/src/context/context.go index a0b5edc524..f39abe91e2 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -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.