{"id":13413967,"url":"https://github.com/polera/gonameparts","last_synced_at":"2026-01-30T15:37:31.111Z","repository":{"id":32179687,"uuid":"35753102","full_name":"polera/gonameparts","owner":"polera","description":"Takes a full name and splits it into individual name parts","archived":false,"fork":false,"pushed_at":"2024-10-04T17:55:05.000Z","size":87,"stargazers_count":42,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-25T05:25:08.868Z","etag":null,"topics":[],"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/polera.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":"2015-05-17T05:20:17.000Z","updated_at":"2024-09-02T23:59:49.000Z","dependencies_parsed_at":"2024-09-09T19:44:50.772Z","dependency_job_id":"44fffa4c-5398-4e00-9f5c-772349ad8c2e","html_url":"https://github.com/polera/gonameparts","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/polera/gonameparts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polera%2Fgonameparts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polera%2Fgonameparts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polera%2Fgonameparts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polera%2Fgonameparts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polera","download_url":"https://codeload.github.com/polera/gonameparts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polera%2Fgonameparts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-07-30T20:01:53.990Z","updated_at":"2026-01-30T15:37:31.092Z","avatar_url":"https://github.com/polera.png","language":"Go","funding_links":[],"categories":["Template Engines","Text Processing","文本处理","\u003cspan id=\"文字处理-text-processing\"\u003e文字处理 Text Processing\u003c/span\u003e","Specific Formats","文本处理`解析和操作文本的代码库`","Bot Building"],"sub_categories":["Parsers/Encoders/Decoders","Advanced Console UIs","解析 器/Encoders/Decoders","HTTP Clients","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","交流","查询语"],"readme":"# gonameparts\ngonameparts splits a human name into individual parts. This is useful when dealing with external data sources that provide names as a single value, but you need to store the discrete parts in a database for example.\n\n[![GoDoc](https://godoc.org/github.com/polera/gonameparts?status.svg)](https://godoc.org/github.com/polera/gonameparts)  \n\nAuthor\n==\nJames Polera \u003cjames@uncryptic.com\u003e\n\nDependencies\n==\nNo external dependencies.  Uses Go's standard packages\n\nExample\n==\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/polera/gonameparts\"\n)\n\nfunc main() {\n\n\t// Parsing a name and printing its parts\n\tnameString := gonameparts.Parse(\"Thurston Howell III\")\n\tfmt.Println(\"FirstName:\", nameString.FirstName)\n\tfmt.Println(\"LastName:\", nameString.LastName)\n\tfmt.Println(\"Generation:\", nameString.Generation)\n\t// Output:\n\t// FirstName: Thurston\n\t// LastName: Howell\n\t// Generation: III\n\n    // Parse a name with multiple \"also known as\" aliases, output JSON\n\tmultipleAKA := gonameparts.Parse(\"Tony Stark a/k/a Ironman a/k/a Stark, Anthony a/k/a Anthony Edward \\\"Tony\\\" Stark\")\n\tjsonParts, _ := json.Marshal(multipleAKA)\n\tfmt.Printf(\"%v\\n\", string(jsonParts))\n\t/* Output:\n\t\t{\n\t    \"aliases\": [\n\t        {\n\t            \"aliases\": null,\n\t            \"first_name\": \"Ironman\",\n\t            \"full_name\": \"Ironman\",\n\t            \"generation\": \"\",\n\t            \"last_name\": \"\",\n\t            \"middle_name\": \"\",\n\t            \"nickname\": \"\",\n\t            \"provided_name\": \" Ironman \",\n\t            \"salutation\": \"\",\n\t            \"suffix\": \"\"\n\t        },\n\t        {\n\t            \"aliases\": null,\n\t            \"first_name\": \"Anthony\",\n\t            \"full_name\": \"Anthony Stark\",\n\t            \"generation\": \"\",\n\t            \"last_name\": \"Stark\",\n\t            \"middle_name\": \"\",\n\t            \"nickname\": \"\",\n\t            \"provided_name\": \" Stark, Anthony \",\n\t            \"salutation\": \"\",\n\t            \"suffix\": \"\"\n\t        },\n\t        {\n\t            \"aliases\": null,\n\t            \"first_name\": \"Anthony\",\n\t            \"full_name\": \"Anthony Edward Stark\",\n\t            \"generation\": \"\",\n\t            \"last_name\": \"Stark\",\n\t            \"middle_name\": \"Edward\",\n\t            \"nickname\": \"\\\"Tony\\\"\",\n\t            \"provided_name\": \" Anthony Edward \\\"Tony\\\" Stark\",\n\t            \"salutation\": \"\",\n\t            \"suffix\": \"\"\n\t        }\n\t    ],\n\t    \"first_name\": \"Tony\",\n\t    \"full_name\": \"Tony Stark\",\n\t    \"generation\": \"\",\n\t    \"last_name\": \"Stark\",\n\t    \"middle_name\": \"\",\n\t    \"nickname\": \"\",\n\t    \"provided_name\": \"Tony Stark a/k/a Ironman a/k/a Stark, Anthony a/k/a Anthony Edward \\\"Tony\\\" Stark\",\n\t    \"salutation\": \"\",\n\t    \"suffix\": \"\"\n\t\t}*/\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolera%2Fgonameparts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolera%2Fgonameparts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolera%2Fgonameparts/lists"}