{"id":16920574,"url":"https://github.com/arriqaaq/set","last_synced_at":"2025-04-11T16:39:58.932Z","repository":{"id":98675611,"uuid":"464830432","full_name":"arriqaaq/set","owner":"arriqaaq","description":"Set is an in-memory Redis like set datastructure","archived":false,"fork":false,"pushed_at":"2022-03-07T08:14:32.000Z","size":6,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T12:51:05.172Z","etag":null,"topics":["data-structures","golang","redis"],"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/arriqaaq.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":"2022-03-01T09:40:45.000Z","updated_at":"2025-01-03T06:30:20.000Z","dependencies_parsed_at":"2023-04-14T01:46:49.678Z","dependency_job_id":null,"html_url":"https://github.com/arriqaaq/set","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arriqaaq","download_url":"https://codeload.github.com/arriqaaq/set/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441942,"owners_count":21104107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["data-structures","golang","redis"],"created_at":"2024-10-13T19:48:48.505Z","updated_at":"2025-04-11T16:39:58.910Z","avatar_url":"https://github.com/arriqaaq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# set\nSet is an in-memory Redis like [set](https://redis.io/commands#set) datastructure\n\nGetting Started\n===============\n\n## Installing\n\nTo start using hash, install Go and run `go get`:\n\n```sh\n$ go get -u github.com/arriqaaq/set\n```\n\nThis will retrieve the library.\n\n## Usage\n\n```go\npackage main\n\nimport \"github.com/arriqaaq/set\"\n\ntype kv struct{k,v string}\n\nfunc main() {\n    key:=\"set1\"\n\n    // SAdd (accepts any value)\n    \ts := set.New()\n\ts.SAdd(key, \"a\")\n\ts.SAdd(key, 1)\n\ts.SAdd(key, \u0026kv{1,2})\n\n    // SPop\n    \ts.SPop(\"set#2\", 1)\n\tisMember := set.SIsMember(key, \"a\")\n\tassert.Equal(t, true, isMember)\n\n    // SRem\n\tn := set.SRem(key, \"member_1\")\n\tassert.Equal(t, true, n)\n\n    // SUnion\n\tset2 := makeSet(3)\n\n\tset2.SAdd(\"set2\", \"a\")\n\tset2.SAdd(\"set2\", \"b\")\n\tset2.SAdd(\"set2\", \"c\")\n\n\tmembers := set.SUnion(key, \"set2\")\n\tassert.Equal(t, 2, len(members))\n\n    // SDiff\n    members := set.SDiff(key, \"set2\")\n    assert.Equal(t, 0, len(members))\n\n}\n```\n\n## Supported Commands\n\n```go\nSADD\nSCARD\nSDIFF\nSDIFFSTORE\nSINTER\nSINTERSTORE\nSISMEMBER\nSMEMBERS\nSMISMEMBER\nSMOVE\nSPOP\nSRANDMEMBER\nSREM\nSUNION\nSUNIONSTORE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farriqaaq%2Fset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fset/lists"}