{"id":36849832,"url":"https://github.com/reactivego/immutable","last_synced_at":"2026-01-12T14:36:35.017Z","repository":{"id":57571475,"uuid":"340954976","full_name":"reactivego/immutable","owner":"reactivego","description":"Immutable Persistent Map for Go","archived":false,"fork":false,"pushed_at":"2023-05-25T12:25:48.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T07:59:38.411Z","etag":null,"topics":["go","hamt","hashmap","immutable","map","persistent"],"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/reactivego.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":"2021-02-21T17:02:15.000Z","updated_at":"2023-05-17T14:23:31.000Z","dependencies_parsed_at":"2024-06-20T06:58:52.923Z","dependency_job_id":"e5a35e11-9a64-4d25-aab7-5e0ec20150f1","html_url":"https://github.com/reactivego/immutable","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/reactivego/immutable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactivego%2Fimmutable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactivego%2Fimmutable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactivego%2Fimmutable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactivego%2Fimmutable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactivego","download_url":"https://codeload.github.com/reactivego/immutable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactivego%2Fimmutable/sbom","scorecard":{"id":765912,"data":{"date":"2025-08-11","repo":{"name":"github.com/reactivego/immutable","commit":"ee9c2d62ced13c2c31c9ba0467e24404b0c08438"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: The Unlicense: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T00:47:12.645Z","repository_id":57571475,"created_at":"2025-08-23T00:47:12.645Z","updated_at":"2025-08-23T00:47:12.645Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["go","hamt","hashmap","immutable","map","persistent"],"created_at":"2026-01-12T14:36:34.221Z","updated_at":"2026-01-12T14:36:35.000Z","avatar_url":"https://github.com/reactivego.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# immutable\n\n    import \"github.com/reactivego/immutable\"\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/reactivego/immutable.svg)](https://pkg.go.dev/github.com/reactivego/immutable#section-documentation)\n\nPackage `immutable` provides an immutable persistent Map type.\nA Map is a collection of unordered `key:value` pairs.\n\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/reactivego/immutable\"\n)\n\nfunc main() {\n\tvar m immutable.Map[string, string]\n\n\tm = m.Set(\"Hello\", \"World!\")\n\n\tfmt.Println(m)\n\n\t// Output:\n\t// {Hello:World!}\n}\n```\n\n``` go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/reactivego/immutable\"\n)\n\nfunc main() {\n\tvar m immutable.Map[string, int]\n\n\tm = m.Set(\"first\", 123).Set(\"second\", 456).Set(\"first\", 789)\n\n\tm.Range(func(key string, value int) bool {\n\t\tfmt.Println(key, value)\n\t\treturn true\n\t})\n\n\t// Unordered Output:\n\t// first 789\n\t// second 456\n}\n```\n\n``` go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/reactivego/immutable\"\n)\n\nfunc main() {\n\t// Key is comparable (i.e. == and !=) but not hashable.\n\t// Notice that the key is a struct with unexported fields that are not\n\t// marshalled by the default json.Marshal function.\n\ttype key struct{ A, B, c int }\n\n\t// Map with a marshal function to convert the key to []byte for hashing.\n\tm := immutable.MapWith[key, string](json.Marshal)\n\n\tm = m.Set(key{1, 2, 3}, \"Mammalia is the class of mammals.\")\n\tm = m.Set(key{1, 2, 4}, \"Aves is the class of birds.\")\n\n\tb, e := json.Marshal(key{1, 2, 3})\n\tfmt.Println(string(b), e)\n\tfmt.Println(m.Get(key{1, 2, 3}))\n\tfmt.Println(m.Get(key{1, 2, 4})) // same hash as key{1, 2, 3} because 'c' is not exported.\n\tfmt.Println(m.Get(key{7, 8, 9}))\n\n\t// Output:\n\t// {\"A\":1,\"B\":2} \u003cnil\u003e\n\t// Mammalia is the class of mammals.\n\t// Aves is the class of birds.\n}\n```\n\n``` go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/reactivego/immutable\"\n)\n\nfunc main() {\n\t// Key is comparable (i.e. == and !=) but not hashable.\n\ttype Key struct{ K1, K2 int64 }\n\ttype Topic struct{ Name, Description string }\n\n\t// Map with a marshal function to convert the key to []byte for hashing.\n\tm := immutable.MapWith[Key, Topic](json.Marshal)\n\n\tm = m.Set(Key{1, 2}, Topic{\"Theme\", \"This is a topic about theme\"})\n\tfmt.Println(m)\n\tfmt.Println(m.Get(Key{1, 2}))\n\n\t// Output:\n\t// {{K1:1 K2:2}:{Name:Theme Description:This is a topic about theme}}\n\t// {Theme This is a topic about theme}\n}\n```\n\n``` go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/reactivego/immutable\"\n)\n\nfunc main() {\n\t// Topic is an example of data where the key (i.e. Name) is part of the data.\n\ttype Topic struct{ Name, Description string }\n\n\tstore := immutable.StoreWith(func(t Topic) (string, Topic) {\n\t\treturn t.Name, t\n\t})\n\n\tstore = store.Put(Topic{Name: \"Aves\", Description: \"This topic is about birds.\"})\n\tstore = store.Put(Topic{Name: \"Mammalia\", Description: \"This topic is about mammals\"})\n\tfmt.Printf(\"%+v\\n\", store.Get(Topic{Name: \"Mammalia\"}))\n\tfmt.Printf(\"%+v\\n\", store.Get(Topic{Name: \"Aves\"}))\n\n\t// Output:\n\t// {Name:Mammalia Description:This topic is about mammals}\n\t// {Name:Aves Description:This topic is about birds.}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactivego%2Fimmutable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactivego%2Fimmutable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactivego%2Fimmutable/lists"}