]> Cypherpunks repositories - gostls13.git/commit
net: add IsNotFound field to DNSError
authorShubham Sharma <shubham.sha12@gmail.com>
Thu, 21 Mar 2019 15:40:12 +0000 (21:10 +0530)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 23 Apr 2019 14:11:33 +0000 (14:11 +0000)
commitfac3b5d05ecf31a2491949cc905312a34e272ae8
tree4a82ef10460246d855e9ece69b40addfbfe561b2
parent7e08c7f43da876bc451b774808e323215a193abd
net: add IsNotFound field to DNSError

This adds the ability to determine if a lookup error was
due to a non-existent hostname. Previously users needed
to do string matching on the DNSError.Err value.

Fixes #28635

Change-Id: If4bd3ad32cbc2db5614f2c6b72e0a9161d813efa
Reviewed-on: https://go-review.googlesource.com/c/go/+/168597
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/cgo_unix.go
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go
src/net/lookup.go
src/net/lookup_test.go
src/net/lookup_windows.go
src/net/net.go