I really appreciate your work on this repo.
This pull request makes two changes to the way errors are handled in this repo.
Detecting which error has occurred with errors.Is() is not possible unless errors are formatted with %w instead of %v. See here for more detail.
Splitting out some of the local errors into public variables (ErrDomainEmpty and ErrWhoisServerNotFound) will let callers check to see if one of these errors occurred. For example errors.Is(err, whois.ErrWhoisServerNotFound)
Hello!
I really appreciate your work on this repo.
This pull request makes two changes to the way errors are handled in this repo.
errors.Is()
is not possible unless errors are formatted with%w
instead of%v
. See here for more detail.ErrDomainEmpty
andErrWhoisServerNotFound
) will let callers check to see if one of these errors occurred. For exampleerrors.Is(err, whois.ErrWhoisServerNotFound)