{"id":36519741,"url":"https://github.com/be-nice/goset","last_synced_at":"2026-01-15T02:04:12.095Z","repository":{"id":332007813,"uuid":"1020502908","full_name":"be-nice/goset","owner":"be-nice","description":"Generic set implementations in golang","archived":false,"fork":false,"pushed_at":"2025-07-16T20:21:16.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T05:25:28.848Z","etag":null,"topics":["go","golang","gomodule","set"],"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/be-nice.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-07-16T01:26:33.000Z","updated_at":"2025-07-16T20:21:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/be-nice/goset","commit_stats":null,"previous_names":["be-nice/goset"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/be-nice/goset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-nice%2Fgoset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-nice%2Fgoset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-nice%2Fgoset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-nice%2Fgoset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/be-nice","download_url":"https://codeload.github.com/be-nice/goset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be-nice%2Fgoset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"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":["go","golang","gomodule","set"],"created_at":"2026-01-12T02:49:47.443Z","updated_at":"2026-01-15T02:04:12.089Z","avatar_url":"https://github.com/be-nice.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goset\n\nA simple wrapper around golangs map[T]struct{} for easier set methods  \nAccepts data types that satisfy the builtin comparable generic.\n\n## how to use\n\n```go\nimport \"github.com/be-nice/goset\"\n```\n\n**Initialize a new set**\n\n```go\ns := goset.New[type]()\n```\n\n**Build set from slice**\n\n```go\ns := goset.FromSlice(slice)\n```\n\n**Make a clone from set A**\n\n```go\ns := a.Clone()\n```\n\n**Clear set**\n\n```go\ns.Clear()\n```\n\n### set methods\n\n**add item**\n\n```go\nfunc (s *Set[T]) Add(val T)\n```\n\n**Remove item**\n\n```go\nfunc (s *Set[T]) Del(val T)\n```\n\n**Check if item is in the set**\n\n```go\nfunc (s *Set[T]) Contains(val T) bool\n```\n\n**Get number of items in the set**\n\n```go\nfunc (s *Set[T]) Len() int\n```\n\n**Return set values in a slice**\n\n```go\nfunc (s *Set[T]) Values() []T\n```\n\n**Return union of A and B**\n\n```go\nfunc (a *Set[T]) Union(b *Set[T]) *Set[T]\n```\n\n**Return intersection of A and B**\n\n```go\nfunc (a *Set[T]) Inter(b *Set[T]) *Set[T]\n```\n\n**Return difference of A and B**\n\n```go\nfunc (a *Set[T]) Diff(b *Set[T]) *Set[T]\n```\n\n**Return symmetric difference between A and B**\n\n```go\nfunc (a *Set[T]) SymDiff(b *Set[T]) *Set[T]\n```\n\n**Compare if set A and B are equal**\n\n```go\nfunc (a *Set[T]) IsEqual(b *Set[T]) bool\n```\n\n**Check if A is subset of B**\n\n```go\nfunc (a *Set[T]) IsSubset(b *Set[T]) bool\n```\n\n**Check if A is proper subset of B**\n\n```go\nfunc (a *Set[T]) IsProperSubset(b *Set[T]) bool\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe-nice%2Fgoset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbe-nice%2Fgoset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe-nice%2Fgoset/lists"}