Open cedar10bits opened 7 years ago
Sorry for some operation mistakes of this pull request(close, reopen, ... ).
Hi, just got back from vacation. Will review your change today or tomorrow. Thanks for pull request!
Hi, Thanks again for the pull request and patience.
Note I don't have any way to test the library on Windows.
From what I understood the problem is that on windows literal error value is different and the code does not enter correct branch and returns invalid value. Why not then add extra if in the branch? THe PR would be like +1 maybe 2 lines.
I add "isNoHost" function to avoid code duplication because there were two "no host" checks. If I do not add "isNoHost", I will have to write same if statement twice.
And if other "no host" case found, I will have to do so, too. If three cases, I will have to write six if. I don't want to write too many if.
@zaccone Could you reply to my opinion?
I want to use this library, but unfortunately I have to use Go 1.7.6 on Windows/Linux. On Windows, in case of "no such host", net.DNSError.Err is "dnsquery: DNS name does not exist". (if Go 1.8.3 on Windows, "no such host") So, even if expected result is "none", spf.CheckHost returns "temperror".
This pull request is a fix for this case.