{"id":37214827,"url":"https://github.com/mickamy/gokitx","last_synced_at":"2026-01-15T00:51:17.146Z","repository":{"id":319394786,"uuid":"1078262163","full_name":"mickamy/gokitx","owner":"mickamy","description":"Utility helpers for Go 1.23+ that cover common patterns","archived":false,"fork":false,"pushed_at":"2025-10-18T02:02:10.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T01:29:23.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mickamy.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-10-17T13:06:15.000Z","updated_at":"2025-10-18T10:32:19.000Z","dependencies_parsed_at":"2025-10-19T01:29:30.623Z","dependency_job_id":"de9f2ee9-87eb-4cde-9e6a-1a34f6f7f2bf","html_url":"https://github.com/mickamy/gokitx","commit_stats":null,"previous_names":["mickamy/gokitx"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mickamy/gokitx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2Fgokitx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2Fgokitx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2Fgokitx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2Fgokitx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mickamy","download_url":"https://codeload.github.com/mickamy/gokitx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mickamy%2Fgokitx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28440571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"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":"2026-01-15T00:51:16.660Z","updated_at":"2026-01-15T00:51:17.138Z","avatar_url":"https://github.com/mickamy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gokitx\n\nUtility helpers for Go 1.23+ that cover common patterns such as ternary evaluation, pointer helpers, and small tuple structs. The library is intentionally lightweight so you can drop in specific pieces without adopting a large framework.\n\n## Modules\n\n- `operator`: generic `Ternary` and `TernaryFunc` helpers that return eager or lazily computed values based on a boolean condition.\n- `slices`: functional helpers like `Map`, `FlatMap`, `GroupBy`, `Find`, `Filter`, and `Unique` for working with collections.\n- `ptr`: convenience functions for working with pointers, including `Of`, `Unwrap`, and `Map`.\n- `tuple`: generic structs for 2–10 element tuples when you need to group multiple return values.\n\n## Installation\n\n```shell\ngo get github.com/mickamy/gokitx\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/mickamy/gokitx/operator\"\n\t\"github.com/mickamy/gokitx/ptr\"\n\t\"github.com/mickamy/gokitx/slices\"\n\t\"github.com/mickamy/gokitx/tuple\"\n)\n\nfunc main() {\n\tnumbers := []int{1, 2, 2, 3}\n\tunique := slices.Unique(numbers)\n\tlabels := slices.Map(unique, func(v int) string {\n\t\treturn fmt.Sprintf(\"value: %d\", v)\n\t})\n\n\tselected, ok := slices.Find(unique, func(v int) bool {\n\t\treturn v \u003e 1\n\t})\n\n\tn := operator.Ternary(ok, selected, 0)\n\n\tp := ptr.Map(ptr.Of(n), func(v int) string {\n\t\treturn fmt.Sprintf(\"value: %d\", v)\n\t})\n\n\tt := tuple.Triple[int, string, []string]{\n\t\tFirst:  n,\n\t\tSecond: ptr.Unwrap(p),\n\t\tThird:  labels,\n\t}\n\n\tfmt.Println(t)\n}\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmickamy%2Fgokitx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmickamy%2Fgokitx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmickamy%2Fgokitx/lists"}