Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: providing context for Verify function #148

Open
yudintsevegor opened this issue Jan 13, 2025 · 0 comments
Open

feature request: providing context for Verify function #148

yudintsevegor opened this issue Jan 13, 2025 · 0 comments

Comments

@yudintsevegor
Copy link

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 v2 of 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant