From 9c6bb607a94f6f4cd27cc3f5e39c192e088ab386 Mon Sep 17 00:00:00 2001 From: ALX99 Date: Sat, 17 Feb 2024 13:29:43 +0900 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. --- 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 1722ac87b8..e95f553804 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) }