{"id":21868742,"url":"https://github.com/davidk/memberset","last_synced_at":"2026-06-28T18:31:42.693Z","repository":{"id":138076221,"uuid":"63994929","full_name":"davidk/memberset","owner":"davidk","description":"A simple in-memory set implementation for storing and testing memberships in Go","archived":false,"fork":false,"pushed_at":"2019-01-21T23:13:03.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T21:45:24.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidk.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":"2016-07-23T02:24:28.000Z","updated_at":"2019-01-21T23:13:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"86eec5f5-adce-4ff0-af81-54a3dd27712e","html_url":"https://github.com/davidk/memberset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidk/memberset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidk%2Fmemberset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidk%2Fmemberset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidk%2Fmemberset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidk%2Fmemberset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidk","download_url":"https://codeload.github.com/davidk/memberset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidk%2Fmemberset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34900367,"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-06-28T02:00:05.809Z","response_time":54,"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":[],"created_at":"2024-11-28T05:15:11.837Z","updated_at":"2026-06-28T18:31:42.689Z","avatar_url":"https://github.com/davidk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# memberset\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/davidk/memberset)](https://goreportcard.com/report/github.com/davidk/memberset)\n[![Build Status](https://travis-ci.org/davidk/memberset.svg?branch=master)](https://travis-ci.org/davidk/memberset)\n[![GoDoc](https://godoc.org/github.com/davidk/memberset?status.svg)](https://godoc.org/github.com/davidk/memberset)\n\nA simple, in-memory set used for storing and testing memberships in Go.\n\n# Usage\n\nSample program:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    set \"github.com/davidk/memberset\"\n)\n\nfunc main() {\n\n    m := set.New()\n    \n    m.Set(123)\n\n    if ok := m.Get(123); ok {\n        fmt.Println(\"Yes, 123 is a part of the set\")\n    } else {\n        fmt.Println(\"Nope, didn't find 123 in the set\")\n    }\n\n    // m.Add == m.Set -- this is mostly for mnemonic memory\n    m.Add(\"1234\")\n\n    if ok := m.Get(\"1234\"); ok {\n        fmt.Println(\"Yes, string 1234 has been added to the set\")\n    }\n\n    m.Delete(\"1234\")\n\n    if ok := m.Get(\"1234\"); ok {\n        fmt.Println(\"Nope, string 1234 is still set. This is a bug.\")\n    } else {\n        fmt.Println(\"Looks like string 1234 was successfully deleted!\")\n    }\n\n}\n```\n\nExpected output:\n\n```bash\n$ go build mtest.go\n$ ./mtest\nYes, 123 is a part of the set\nYes, string 1234 has been added to the set\nLooks like string 1234 was successfully deleted!\n```\n\n# Installation\n\n### Get started by vendoring or by using `go get -u github.com/davidk/memberset`\n\n# Related\n\nThere are other projects that have more through set implementations. Check these out:\n\n* [deckarep/golang-set](https://github.com/deckarep/golang-set)\n\n* [faith/set](https://github.com/fatih/set)\n\nAnd [a proposal](https://github.com/golang/go/issues/16466) on golang/go to add a built-in set type. There's a link to a [playground entry](https://play.golang.org/p/VhCbdtJzwz) with a complete set implementation.\n\n# License\n\n[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidk%2Fmemberset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidk%2Fmemberset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidk%2Fmemberset/lists"}