From 71d84ee7b4e42ea9f35f409f169bebd44a360331 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Sat, 13 Apr 2024 07:01:44 +0000 Subject: net: add Unwrap to *DNSError Fixes #63116 Change-Id: Iab8c415555ab85097be6d2d133b3349c5219a23b GitHub-Last-Rev: 8a8177b9af5509ebbaa701b06c79126aae7510a8 GitHub-Pull-Request: golang/go#63348 Reviewed-on: https://go-review.googlesource.com/c/go/+/532217 Auto-Submit: Ian Lance Taylor Reviewed-by: Damien Neil Reviewed-by: Ian Lance Taylor Commit-Queue: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- doc/next/6-stdlib/99-minor/net/63116.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/next/6-stdlib/99-minor/net/63116.md (limited to 'doc') diff --git a/doc/next/6-stdlib/99-minor/net/63116.md b/doc/next/6-stdlib/99-minor/net/63116.md new file mode 100644 index 0000000000..d847a5545e --- /dev/null +++ b/doc/next/6-stdlib/99-minor/net/63116.md @@ -0,0 +1,3 @@ +The [`DNSError`](/pkg/net#DNSError) type now wraps errors caused by timeouts +or cancelation. For example, `errors.Is(someDNSErr, context.DeadlineExceedeed)` +will now report whether a DNS error was caused by a timeout. -- cgit v1.2.3-54-g00ecf