From bc8cfd2492ce284d243288fd31e342316f99462f Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Wed, 18 Sep 2024 15:24:35 -0400 Subject: [PATCH] Add a note about context.Deadline --- deadline/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deadline/README.md b/deadline/README.md index c181973..6f9865c 100644 --- a/deadline/README.md +++ b/deadline/README.md @@ -7,6 +7,8 @@ deadline The deadline/timeout resiliency pattern for golang. +Note that the golang standard library now offers [`context.withDeadline`](https://pkg.go.dev/context#example-WithDeadline) with very similar functionality. This `deadline` package will probably be deprecated and removed in some future version. + Creating a deadline takes one parameter: how long to wait. ```go