{"id":19623897,"url":"https://github.com/msskowron/genericsafemap","last_synced_at":"2025-02-26T19:33:04.956Z","repository":{"id":153533250,"uuid":"629022170","full_name":"MSSkowron/GenericSafeMap","owner":"MSSkowron","description":"Thread-safe map implementation in Golang that supports generics.","archived":false,"fork":false,"pushed_at":"2023-04-17T21:03:32.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T11:55:59.876Z","etag":null,"topics":["generics","go","map","thread-safety"],"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/MSSkowron.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":"2023-04-17T13:12:34.000Z","updated_at":"2024-09-30T09:17:19.000Z","dependencies_parsed_at":"2023-05-19T02:15:35.098Z","dependency_job_id":null,"html_url":"https://github.com/MSSkowron/GenericSafeMap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSSkowron%2FGenericSafeMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSSkowron%2FGenericSafeMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSSkowron%2FGenericSafeMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSSkowron%2FGenericSafeMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MSSkowron","download_url":"https://codeload.github.com/MSSkowron/GenericSafeMap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240921623,"owners_count":19878985,"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":["generics","go","map","thread-safety"],"created_at":"2024-11-11T11:36:00.021Z","updated_at":"2025-02-26T19:33:04.922Z","avatar_url":"https://github.com/MSSkowron.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GenericSafeMap\n\nGenericSafeMap is a Go library providing a thread-safe map implementation that supports generics, available from Go version 1.18 onwards. This library provides type-safe access to the underlying data structure using generics to ensure that the data stored and retrieved are of the same type.\n\n## Installation\n\nTo use this library, you can install it using the go get command:\n\n```\ngo get github.com/MSSkowron/genericsafemap\n```\n\n## Usage\n\nHere's an example of how to use the GenericSafeMap library:\n\n```\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/MSSkowron/genericsafemap\"\n)\n\nfunc main() {\n    m := genericsafemap.New[string, int]()\n    m.Put(\"one\", 1)\n    m.Put(\"two\", 2)\n\n    val, ok := m.Get(\"one\")\n    if !ok {\n        fmt.Println(\"Key not found\")\n    } else {\n        fmt.Println(val)\n    }\n\n    m.Remove(\"one\")\n\n    val, ok = m.Get(\"one\")\n    if !ok {\n        fmt.Println(\"Key not found\")\n    } else {\n        fmt.Println(val)\n    }\n}\n```\n\nIn the above example, we create a new GenericSafeMap instance with string keys and int values, add two key-value pairs to the map, retrieve the value for key \"one\", remove the key \"one\", and then attempt to retrieve the value for \"one\" again.\n\n## License\n\nThe library is available as open source under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsskowron%2Fgenericsafemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsskowron%2Fgenericsafemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsskowron%2Fgenericsafemap/lists"}