We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
❯ tinygo run verifier.go # net/smtp /usr/lib/go/src/net/smtp/smtp.go:72:24: undefined: tls.Conn /usr/lib/go/src/net/smtp/smtp.go:172:25: undefined: tls.Conn
package main import ( "encoding/json" "fmt" emailVerifier "github.com/AfterShip/email-verifier" ) type Result struct { Data *emailVerifier.Result `json:"data"` Error error `json:"error"` } func (p Result) ToJson(result Result) (*string, error) { bytes, err := json.Marshal(result) if err != nil { fmt.Println("Error converting to JSON:", err) return nil, err } json := string(bytes) return &json, nil } //export add func verify(email string) string { var result Result verifier := emailVerifier.NewVerifier().EnableAutoUpdateDisposable() ret, err := verifier.Verify(email) if err != nil { result = Result{ Data: nil, Error: err, } } else { result = Result{ Data: ret, Error: nil, } } bytes, err := json.Marshal(result) if err != nil { fmt.Println("Error converting to JSON:", err) return fmt.Sprintf("{error:%s}", err.Error()) } return string(bytes) } func main() { fmt.Println(verify("[email protected]")) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
verifier.go
The text was updated successfully, but these errors were encountered: