From e79a4f71b7af648ef594f824951800ccc555d727 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 23 Nov 2022 17:42:01 -0500 Subject: [PATCH] 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 --- src/context/context.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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. -- 2.50.0