]> Cypherpunks repositories - gostls13.git/commitdiff
net: document IsNotFound field
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Fri, 17 Nov 2023 13:52:01 +0000 (13:52 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 17 Nov 2023 18:12:04 +0000 (18:12 +0000)
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 <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/net/net.go

index 5cfc25ffca8fcfb2eeee864923f4f3d95986c31e..396713ce4ab675a8ec2fb4a563552bdc24a2e6da 100644 (file)
@@ -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 {