-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
Good afternoon.
Current implementation doesn't accept context.Context on function (https://github.com/AfterShip/email-verifier/blob/main/verifier.go#L63):
func (v *Verifier) Verify(email string) (*Result, error) {
that doesn't allow users to cancel the request if it takes too long to execute it.
Underneath net package is used without context (f.e.: mx, err := net.LookupMX(domain) (https://github.com/AfterShip/email-verifier/blob/main/mx.go#L14)). However, net pakcage includes Resolver functionality which accepts context as an argument.
I assume, changing the signature of the function with new input arg ctx context.Context would be a breaking change.
- Do you have an intention to provide
v2of the package with this and any other changes in mind? - Do you see any blockers to do it in the nearest future?
I guess, I am happy to contribute and provide this feature, but asking in advance if you have any general concerns about it.
Thank you!
nigelramsay
Metadata
Metadata
Assignees
Labels
No labels