aboutsummaryrefslogtreecommitdiff
path: root/src/context
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2024-03-22 23:31:44 +0800
committerGopher Robot <gobot@golang.org>2024-03-26 19:58:28 +0000
commit1e12eab8705d1d8d7472be9147a39caa1c8380db (patch)
treecde9e173c3e757516f56f9e66c41065513738832 /src/context
parent4217877670e94b88ddd1ee1041b31d5825b08e2a (diff)
downloadgo-1e12eab8705d1d8d7472be9147a39caa1c8380db.tar.gz
go-1e12eab8705d1d8d7472be9147a39caa1c8380db.zip
all: fix a large number of comments
Partial typo corrections, following https://go.dev/wiki/Spelling Change-Id: I2357906ff2ea04305c6357418e4e9556e20375d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/573776 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/context')
-rw-r--r--src/context/context.go2
-rw-r--r--src/context/x_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/context/context.go b/src/context/context.go
index e95f553804..30adfe987d 100644
--- a/src/context/context.go
+++ b/src/context/context.go
@@ -295,7 +295,7 @@ func Cause(c Context) error {
}
// AfterFunc arranges to call f in its own goroutine after ctx is done
-// (cancelled or timed out).
+// (canceled or timed out).
// If ctx is already done, AfterFunc calls f immediately in its own goroutine.
//
// Multiple calls to AfterFunc on a context operate independently;
diff --git a/src/context/x_test.go b/src/context/x_test.go
index e9b0576281..2c66ed42b2 100644
--- a/src/context/x_test.go
+++ b/src/context/x_test.go
@@ -1064,7 +1064,7 @@ func TestAfterFuncNotCalledAfterStop(t *testing.T) {
}
}
-// This test verifies that cancelling a context does not block waiting for AfterFuncs to finish.
+// This test verifies that canceling a context does not block waiting for AfterFuncs to finish.
func TestAfterFuncCalledAsynchronously(t *testing.T) {
ctx, cancel := WithCancel(Background())
donec := make(chan struct{})