Skip to content

feature request: providing context for Verify function #148

@yudintsevegor

Description

@yudintsevegor

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions