{"id":15648950,"url":"https://github.com/stirby/mapgen","last_synced_at":"2025-09-13T03:42:27.141Z","repository":{"id":57640644,"uuid":"94504804","full_name":"stirby/mapgen","owner":"stirby","description":"Generate thread-safe, type-safe Go maps","archived":false,"fork":false,"pushed_at":"2023-07-19T22:21:11.000Z","size":32,"stargazers_count":40,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T17:11:09.460Z","etag":null,"topics":["code-generation","concurrent-map","golang","map","mapgen","threadsafe"],"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/stirby.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}},"created_at":"2017-06-16T04:22:51.000Z","updated_at":"2023-07-19T21:54:18.000Z","dependencies_parsed_at":"2023-07-19T23:34:25.191Z","dependency_job_id":null,"html_url":"https://github.com/stirby/mapgen","commit_stats":null,"previous_names":["s-kirby/mapgen","stirby/mapgen","ammario/mapgen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stirby%2Fmapgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stirby%2Fmapgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stirby%2Fmapgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stirby%2Fmapgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stirby","download_url":"https://codeload.github.com/stirby/mapgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251723249,"owners_count":21633113,"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":["code-generation","concurrent-map","golang","map","mapgen","threadsafe"],"created_at":"2024-10-03T12:27:11.946Z","updated_at":"2025-04-30T14:44:06.297Z","avatar_url":"https://github.com/stirby.png","language":"Go","readme":"\u003e **Note**\n\u003e As of Go 1.18, just use generics.\n\n---\n\n# mapgen\n\nA tool which generates thread safe maps for Go.\n\nFeatures:\n\n- Supports any key/value pair supported by Go's native maps\n- Allows complex operations via `Lock()` and `Unlock()`\n- Generated code conforms to `golint` and `gofmt`\n- Allows custom types\n- Sensible default file name and map name\n- Optionally generates using `sync.RWMutex`\n\nGenerated example located in `examples/`\n\n## Install\n\n`go get -u github.com/s-kirby/mapgen/cmd/mapgen`\n\n## Usage\n\nCreate string -\u003e int map:\n\n```bash\n$ mapgen string/int\nWrote string_int_map_gen.go\n```\n\nCreate string -\u003e *bytes.Buffer map using a read-write mutex:\n\n```bash\n$ mapgen --rwmu string/*bytes.Buffer\nWrote string_buffer_map_gen.go\n```\n\nHelp:\n\n```\nusage: mapgen [\u003cflags\u003e] \u003ckeyvalue types\u003e [\u003ctname\u003e]\n\nFlags:\n      --help       Show context-sensitive help (also try --help-long and --help-man).\n  -p, --pkg=\".\"    package name\n  -v, --verbose    highly descriptive output\n  -f, --file=FILE  output file name\n      --rwmu       Use RWMutex\n\nArgs:\n  \u003ckeyvalue types\u003e  Key and value types, e.g `string/int`\n  [\u003ctname\u003e]         name of generated type\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstirby%2Fmapgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstirby%2Fmapgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstirby%2Fmapgen/lists"}