{"id":25995044,"url":"https://github.com/itcomusic/mapo","last_synced_at":"2026-04-19T11:35:02.033Z","repository":{"id":249418644,"uuid":"831432324","full_name":"itcomusic/mapo","owner":"itcomusic","description":"An golang map where the keys keep the order","archived":false,"fork":false,"pushed_at":"2024-07-20T16:16:41.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-20T17:34:36.620Z","etag":null,"topics":["golang","json","map","order"],"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/itcomusic.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":"2024-07-20T14:29:15.000Z","updated_at":"2024-07-20T17:34:46.344Z","dependencies_parsed_at":"2024-07-20T17:44:52.151Z","dependency_job_id":null,"html_url":"https://github.com/itcomusic/mapo","commit_stats":null,"previous_names":["itcomusic/mapo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcomusic%2Fmapo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcomusic%2Fmapo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcomusic%2Fmapo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcomusic%2Fmapo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itcomusic","download_url":"https://codeload.github.com/itcomusic/mapo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242048559,"owners_count":20063404,"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":["golang","json","map","order"],"created_at":"2025-03-05T15:18:28.314Z","updated_at":"2026-04-19T11:34:56.996Z","avatar_url":"https://github.com/itcomusic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Map Order\n\n[![build-img]][build-url]\n[![pkg-img]][pkg-url]\n[![coverage-img]][coverage-url]\n\nIs a custom implementation of a map in Go that maintains the order of keys as they are added\n## Features\n\n- **Order Preservation**: Keys are stored in the order they are added\n- **Custom JSON Marshalling**: Implements custom JSON marshalling and unmarshalling to ensure the order of keys is preserved when converting to and from JSON\n- **Key Management**: Provides methods to add, delete, and retrieve keys in their maintained order\n\n## Installation\n\nGo version 1.21+\n\n```bash\ngo get github.com/itcomusic/mapo\n```\n\n## Usage\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/itcomusic/mapo\"\n)\n\nfunc main() {\n    m := mapo.New()\n    m.Set(\"a\", 1)\n    m.Set(\"b\", 2)\n    m.Set(\"c\", 3)\n    \n    fmt.Println(m.Keys()) // [a, b, c]\n\t\n    value, ok := m.Get(\"a\")\n    fmt.Println(value, ok) // 1, true\n    m.Delete(\"c\")\n    \n    b, _ := json.Marshal(m)\n    fmt.Println(string(b)) // {\"a\":1,\"b\":2}\n    \n    var m2 mapo.Map\n    _ = json.Unmarshal(b, \u0026m2)\n    fmt.Println(m2.Keys()) // [a, b]\n}\n\n```\n\n## License\n\n[MIT License](LICENSE)\n\n[build-img]: https://github.com/itcomusic/mapo/workflows/build/badge.svg\n\n[build-url]: https://github.com/itcomusic/mapo/actions\n\n[pkg-img]: https://pkg.go.dev/badge/github.com/itcomusic/mapo.svg\n\n[pkg-url]: https://pkg.go.dev/github.com/itcomusic/mapo\n\n[coverage-img]: https://codecov.io/gh/itcomusic/mapo/branch/main/graph/badge.svg\n\n[coverage-url]: https://codecov.io/gh/itcomusic/mapo","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcomusic%2Fmapo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitcomusic%2Fmapo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcomusic%2Fmapo/lists"}