{"id":13412671,"url":"https://github.com/dimuska139/go-email-normalizer","last_synced_at":"2025-10-14T03:44:26.518Z","repository":{"id":47348909,"uuid":"289382211","full_name":"dimuska139/go-email-normalizer","owner":"dimuska139","description":"Golang library for providing a canonical representation of email address.","archived":false,"fork":false,"pushed_at":"2025-01-26T09:15:09.000Z","size":42,"stargazers_count":68,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T09:15:51.011Z","etag":null,"topics":["email","go","golang","normalization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimuska139.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-21T23:13:04.000Z","updated_at":"2025-03-09T19:16:22.000Z","dependencies_parsed_at":"2024-01-08T09:42:50.388Z","dependency_job_id":"fefacf29-d79b-4b8d-9724-c42ab085ceda","html_url":"https://github.com/dimuska139/go-email-normalizer","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimuska139%2Fgo-email-normalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimuska139%2Fgo-email-normalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimuska139%2Fgo-email-normalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimuska139%2Fgo-email-normalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimuska139","download_url":"https://codeload.github.com/dimuska139/go-email-normalizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018061,"owners_count":21034048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","go","golang","normalization"],"created_at":"2024-07-30T20:01:27.626Z","updated_at":"2025-10-14T03:44:21.484Z","avatar_url":"https://github.com/dimuska139.png","language":"Go","funding_links":[],"categories":["Email","Authentication and OAuth","Uncategorized","认证和OAuth授权","电子邮件"],"sub_categories":["Search and Analytic Databases","Contents","Advanced Console UIs","检索及分析资料库"],"readme":"# go-email-normalizer - email normalization for Go\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/dimuska139/go-email-normalizer.svg)](https://pkg.go.dev/github.com/dimuska139/tilda-go)\n[![codecov](https://codecov.io/github/dimuska139/go-email-normalizer/graph/badge.svg?token=E1TagDCBXc)](https://codecov.io/gh/dimuska139/go-email-normalizer)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dimuska139/go-email-normalizer)](https://goreportcard.com/report/github.com/dimuska139/go-email-normalizer)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/dimuska139/go-email-normalizer/blob/master/LICENSE)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)  \n\nThis is Golang library for providing a canonical representation of email address. It allows\nto prevent multiple signups. `go-email-normalizer` contains some popular providers but you can easily append others.\n\n## Download\n\n```shell\ngo get -u github.com/dimuska139/go-email-normalizer/v5\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\tnormalizer \"github.com/dimuska139/go-email-normalizer/v5\"\n)\n\ntype customRule struct {}\n\nfunc (rule *customRule) ProcessUsername(username string) string {\n\treturn strings.Replace(username, \"-\", \"\", -1)\n}\n\nfunc (rule *customRule) ProcessDomain(domain string) string {\n\treturn domain\n}\n\nfunc main() {\n\tn := normalizer.NewNormalizer()\n\tfmt.Println(n.Normalize(\"vasya+pupkin@gmail.com\")) // vasya@gmail.com\n\tfmt.Println(n.Normalize(\"t.e-St+vasya@gmail.com\")) // te-st@gmail.com\n\tfmt.Println(n.Normalize(\"John+Brown@yahoo.com\"))   // john+brown@yahoo.com\n\tfmt.Println(n.Normalize(\"John-Brown@yahoo.com\"))   // john@yahoo.com\n\tfmt.Println(n.Normalize(\"t.e-St+@googlemail.com\")) // te-st@gmail.com\n\tfmt.Println(n.Normalize(\"t.e-St+@google.com\"))     // te-st@gmail.com\n\t\n\tn.AddRule(\"customrules.com\", \u0026customRule{})\n\tfmt.Println(n.Normalize(\" tE-S-t@CustomRules.com.\")) // tESt@customrules.com\n}\n```\n\n\n## Supported providers\n\n* Apple\n* Fastmail\n* Google\n* Microsoft\n* Protonmail\n* Rackspace\n* Rambler\n* Yahoo\n* Yandex\n* Zoho\n\nAlso you can integrate other rules using `AddRule` function (see an example above)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimuska139%2Fgo-email-normalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimuska139%2Fgo-email-normalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimuska139%2Fgo-email-normalizer/lists"}