{"id":50384572,"url":"https://github.com/initdc/types","last_synced_at":"2026-05-30T14:01:36.916Z","repository":{"id":325957228,"uuid":"1103082310","full_name":"initdc/types","owner":"initdc","description":"Bring the Rust [Result Option] types to Golang","archived":false,"fork":false,"pushed_at":"2026-05-29T03:29:22.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2026-05-29T05:17:29.854Z","etag":null,"topics":["error-handling","go","option-type","result-type","rust"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/initdc.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-24T12:05:08.000Z","updated_at":"2026-05-29T03:29:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/initdc/types","commit_stats":null,"previous_names":["initdc/types"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/initdc/types","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Ftypes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Ftypes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Ftypes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Ftypes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/initdc","download_url":"https://codeload.github.com/initdc/types/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initdc%2Ftypes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33694714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["error-handling","go","option-type","result-type","rust"],"created_at":"2026-05-30T14:01:36.345Z","updated_at":"2026-05-30T14:01:36.894Z","avatar_url":"https://github.com/initdc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# types\n\nBring the Rust [Result Option] types to Golang\n\n## Installation\n\n  `go get github.com/initdc/types@dev`\n\n## Usage\n\n```go\npackage e2e_test\n\nimport (\n\t\"fmt\"\n\t. \"github.com/initdc/types/option\"\n\t. \"github.com/initdc/types/result\"\n\t\"testing\"\n)\n\nfunc TestE2E(t *testing.T) {\n\t// Option\n\ts1 := Some(1)\n\n\tvar s2 Option[int]\n\ts2.None()\n\n\tn1 := None[int]()\n\n\n\t// Result\n\tvar r1 Result[int, string]\n\tr1.Ok(1)\n\n\tvar e1 Result[int, string]\n\te1.Err(\"error\")\n\n\tr2 := Ok[int, string](1)\n\te2 := Err[int, string](\"error\")\n\n\tfmt.Printf(\"%#v\\n\", s1)\n\tfmt.Printf(\"%#v\\n\", s2)\n\tfmt.Printf(\"%#v\\n\", n1)\n\n\tfmt.Printf(\"%#v\\n\", r1)\n\tfmt.Printf(\"%#v\\n\", e1)\n\tfmt.Printf(\"%#v\\n\", r2)\n\tfmt.Printf(\"%#v\\n\", e2)\n}\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/initdc/types.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitdc%2Ftypes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitdc%2Ftypes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitdc%2Ftypes/lists"}