From a9722bf9184d087c538855fb15f5a5d9a48a5819 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Fri, 17 Nov 2023 13:52:01 +0000 Subject: [PATCH] net: document IsNotFound field After CL 534937, the IsNotFound field is set to true on nodata and NXDOMAIN conditions consistently across systems and all lookup methods. Change-Id: I419d1c818f17e915cee4959c3a9ac92c2e4bb92c GitHub-Last-Rev: 59c537fc0626bfa959f43f9e9958f7af0e54ca55 GitHub-Pull-Request: golang/go#63654 Reviewed-on: https://go-review.googlesource.com/c/go/+/536775 Reviewed-by: Damien Neil Auto-Submit: Damien Neil Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- src/net/net.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/net/net.go b/src/net/net.go index 5cfc25ffca..396713ce4a 100644 --- a/src/net/net.go +++ b/src/net/net.go @@ -624,7 +624,11 @@ type DNSError struct { Server string // server used IsTimeout bool // if true, timed out; not all timeouts set this IsTemporary bool // if true, error is temporary; not all errors set this - IsNotFound bool // if true, host could not be found + + // IsNotFound is set to true when the requested name does not + // contain any records of the requested type (data not found), + // or the name itself was not found (NXDOMAIN). + IsNotFound bool } func (e *DNSError) Error() string { -- 2.50.0