{"id":42301802,"url":"https://github.com/bibenga/orderedmap","last_synced_at":"2026-01-27T10:37:25.840Z","repository":{"id":311316435,"uuid":"1036818853","full_name":"bibenga/orderedmap","owner":"bibenga","description":"OrderedMap provides three implementations of a map that preserves insertion order.","archived":false,"fork":false,"pushed_at":"2025-08-23T16:26:43.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T06:15:49.912Z","etag":null,"topics":["golang","hashmap","linkedhashmap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bibenga.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,"zenodo":null}},"created_at":"2025-08-12T16:18:49.000Z","updated_at":"2025-08-23T16:25:56.000Z","dependencies_parsed_at":"2025-08-24T07:27:45.318Z","dependency_job_id":"2329990c-dd3f-45dd-9964-58a3c9b46370","html_url":"https://github.com/bibenga/orderedmap","commit_stats":null,"previous_names":["bibenga/orderedmap"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bibenga/orderedmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibenga%2Forderedmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibenga%2Forderedmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibenga%2Forderedmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibenga%2Forderedmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bibenga","download_url":"https://codeload.github.com/bibenga/orderedmap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bibenga%2Forderedmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"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":["golang","hashmap","linkedhashmap"],"created_at":"2026-01-27T10:37:22.864Z","updated_at":"2026-01-27T10:37:25.830Z","avatar_url":"https://github.com/bibenga.png","language":"Go","readme":"# OrderedMap for Go\n\n**OrderedMap** provides three implementations of a map that preserves **insertion order**.  \nUnlike Go’s built-in `map`, these maps maintain predictable iteration order.\n\nThis library built on top of [AbstractLinkedMap](https://github.com/apache/commons-collections/blob/master/src/main/java/org/apache/commons/collections4/map/AbstractLinkedMap.java) from Apache Commons Collections.\n\n## Available Implementations\n\n### 1. `IntLinkedHashMap[K gomaps.Integer, V any]`\n- Key type: any integers\n- Optimized for integer keys  \n- Preserves insertion order  \n- Fast `Get`, `Put`, `Delete`, and iteration\n- Predictable iteration via `Keys()`, `Values()`, and `Items()`\n\n### 2. `LinkedHashMap[K comparable, V any]`\n- Generic key type  \n- Requires a **custom hash function** for the key type  \n- Preserves insertion order  \n- Useful for complex key types (structs, strings, etc.)\n- Predictable iteration via `Keys()`, `Values()`, and `Items()`\n\n### 3. `LinkedMapEntry[K comparable, V any]`\n- Wrapper over Go’s built-in `map[K]V`  \n- Uses `container/list` to maintain insertion order  \n- Simple, safe, and fully generic  \n- Slightly higher overhead due to linked list\n- Predictable iteration via `Keys()`, `Values()`, and `Items()`\n\n## Installation\n```bash\ngo get github.com/bibenga/orderedmap\n```\n\n## Usage\n```go\nimport \"github.com/olala/orderedmap/intlinkedhashmap\"\n\n// IntLinkedHashMap\nintMap := intlinkedhashmap.NewDefault[int, int]()\nintMap.Put(1, 12)\nintMap.Put(2, 234)\nfor k, v := range m.Items() {\n\t...\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbibenga%2Forderedmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbibenga%2Forderedmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbibenga%2Forderedmap/lists"}