diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -45,7 +45,10 @@ func main() { } func printErr(ip net.IP, rrtype string, err error) { - if !strings.Contains(err.Error(), "no such host") { + // the error types here are awful and this feels like it might + // accidentally catch some non-NXDOMAIN errors + if !strings.HasSuffix(err.Error(), "no such host") && + !strings.HasSuffix(err.Error(), "nodename nor servname provided, or not known") { fmt.Fprintf(os.Stderr, "%s\t# %s error: %s\n", ip, rrtype, err) } } |