Skip to content

Commit

Permalink
context: update doc comment to link to context interface
Browse files Browse the repository at this point in the history
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: 9c6bb60
GitHub-Pull-Request: #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>
  • Loading branch information
ALX99 authored and gopherbot committed Feb 17, 2024
1 parent 86a32d6 commit af5943f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit af5943f

Please sign in to comment.