From af5943f90cc919c38188067bbe006bdc148b576c Mon Sep 17 00:00:00 2001 From: ALX99 Date: Sat, 17 Feb 2024 04:43:34 +0000 Subject: [PATCH] context: update doc comment to link to context interface 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 Reviewed-by: Ian Lance Taylor Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- src/context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context/context.go b/src/context/context.go index 1722ac87b865d..e95f553804fc6 100644 --- a/src/context/context.go +++ b/src/context/context.go @@ -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) }