{"id":37207103,"url":"https://github.com/ferreiravinicius/gollections","last_synced_at":"2026-01-14T23:49:39.145Z","repository":{"id":104607353,"uuid":"442306404","full_name":"ferreiravinicius/gollections","owner":"ferreiravinicius","description":"Collections for Golang using generics. Currently containing Hash Set.","archived":false,"fork":false,"pushed_at":"2021-12-30T17:35:07.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-19T17:56:33.544Z","etag":null,"topics":["collections","go","golang","hashset","set"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferreiravinicius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-12-28T00:27:14.000Z","updated_at":"2021-12-30T17:35:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0848d53a-69f0-40a4-a27d-2a14cead7c89","html_url":"https://github.com/ferreiravinicius/gollections","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ferreiravinicius/gollections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferreiravinicius%2Fgollections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferreiravinicius%2Fgollections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferreiravinicius%2Fgollections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferreiravinicius%2Fgollections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferreiravinicius","download_url":"https://codeload.github.com/ferreiravinicius/gollections/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferreiravinicius%2Fgollections/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","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":["collections","go","golang","hashset","set"],"created_at":"2026-01-14T23:49:38.498Z","updated_at":"2026-01-14T23:49:39.123Z","avatar_url":"https://github.com/ferreiravinicius.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg align=\"center\" width=\"500px\" src=\"gollections.png\"\u003e\n\u003c/p\u003e \n\u003cp align=\"center\"\u003e\nImplementation of missing colections for Golang using Generics. \u003cbr\u003e \nFree of dependencies.  \u003cbr /\u003e\nCurently in \u003cb\u003eearly development\u003c/b\u003e phase.\n\u003c/p\u003e  \n\n## Requirements\n\nGo **1.18+**\n\n## Install\n\n```console\n$ go get -u github.com/ferreiravinicius/gollections\n```\n\n## Set\n\nSet is a collection that contains no duplicate elements.  \nAll implementations follows the set.Set interface.\n\n## Hash Set\n\nImplemention of set backed by a hash table (Go builtin Map).  \nOrder of insertion is not guaranteed.  \nThis implementation is not synchronized.\n\n#### **API**\n\nImporting\n```golang\nimport \"github.com/ferreiravinicius/goset/hashset\"\n```\n\nCreate a new empty set\n```golang\nset := hashset.New[int]() \n```\n\nCreate a new set initialized\n```golang\nset := hashset.From(1, 2, 3) \n\nitems := []int{4, 5, 6}\nset := hashset.From(items...) \n```\n\nCreate a new set with initial capacity \n```golang\nset := hashset.WithCapacity[int](100) \n```\n\nIterating over the set using builtin loop\n\n```golang\nset := hashset.From(1, 2, 3)\nfor item := range set {\n  // foo(item)\n}\n```\n\nIterating over the set using `ForEach`\n```golang\nset := hashset.From(1, 2, 3) \nset.ForEach(func(item int) { \n // foo(item) \n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferreiravinicius%2Fgollections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferreiravinicius%2Fgollections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferreiravinicius%2Fgollections/lists"}