]> Cypherpunks repositories - gostls13.git/commitdiff
context: update doc comment to link to context interface
authorALX99 <alx245669@gmail.com>
Sat, 17 Feb 2024 04:43:34 +0000 (04:43 +0000)
committerGopher Robot <gobot@golang.org>
Sat, 17 Feb 2024 23:25:55 +0000 (23:25 +0000)
Linking to the Context interface in the WithCancel doc comment makes
it more consistent with the WithDeadline and WithTimeout doc comments.

Change-Id: Ic935c63e8262784be5f3564816402221ba2fbd63
GitHub-Last-Rev: 9c6bb607a94f6f4cd27cc3f5e39c192e088ab386
GitHub-Pull-Request: golang/go#65768
Reviewed-on: https://go-review.googlesource.com/c/go/+/564996
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/context/context.go

index 1722ac87b865daf6caa47e11338a56896b0f576e..e95f553804fc677f776785f428361516f580630d 100644 (file)
@@ -231,7 +231,7 @@ type CancelFunc func()
 // or when the parent context's Done channel is closed, whichever happens first.
 //
 // Canceling this context releases resources associated with it, so code should
-// call cancel as soon as the operations running in this Context complete.
+// call cancel as soon as the operations running in this [Context] complete.
 func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
        c := withCancel(parent)
        return c, func() { c.cancel(true, Canceled, nil) }