badoux / checkmail

Golang package for email validation
MIT License
710 stars 92 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #18

Closed c4nc closed 6 years ago

c4nc commented 6 years ago

Hi, func ValidateHost() of checkmail.go trow "panic: runtime error: invalid memory address or nil pointer dereference" if err is not nil on connection. You should check the error before call the defer function on line 55.

(https://stackoverflow.com/questions/16280176/go-panic-runtime-error-invalid-memory-address-or-nil-pointer-dereference)

Regards

Update: I just see that you already have a couple of pull requests for this. I close my issue as duplicated.

c4nc commented 6 years ago

I've just see that you already have a pull request for this error.