{"id":17481589,"url":"https://github.com/lorenzosaino/go-orderedmap","last_synced_at":"2025-03-28T13:13:52.353Z","repository":{"id":79414656,"uuid":"453935052","full_name":"lorenzosaino/go-orderedmap","owner":"lorenzosaino","description":"Go implementation of an ordered map using generics","archived":false,"fork":false,"pushed_at":"2023-04-08T20:50:26.000Z","size":1319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T13:28:19.594Z","etag":null,"topics":["go","golang","orderedmap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzosaino.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":"2022-01-31T08:50:37.000Z","updated_at":"2022-02-19T14:51:48.000Z","dependencies_parsed_at":"2024-06-20T04:27:02.786Z","dependency_job_id":"521da92c-e27a-4f39-b18a-24f3e8f63f85","html_url":"https://github.com/lorenzosaino/go-orderedmap","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/lorenzosaino%2Fgo-orderedmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-orderedmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-orderedmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzosaino%2Fgo-orderedmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzosaino","download_url":"https://codeload.github.com/lorenzosaino/go-orderedmap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246034301,"owners_count":20712857,"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":["go","golang","orderedmap"],"created_at":"2024-10-18T22:23:24.567Z","updated_at":"2025-03-28T13:13:52.321Z","avatar_url":"https://github.com/lorenzosaino.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go ordered map\n\n[![GoDoc](https://img.shields.io/static/v1?label=godoc\u0026message=reference\u0026color=blue)](https://pkg.go.dev/github.com/lorenzosaino/go-orderedmap)\n[![Build](https://github.com/lorenzosaino/go-orderedmap/workflows/Build/badge.svg)](https://github.com/lorenzosaino/go-orderedmap/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lorenzosaino/go-orderedmap)](https://goreportcard.com/report/github.com/lorenzosaino/go-orderedmap)\n[![License](https://img.shields.io/github/license/lorenzosaino/go-orderedmap.svg)](https://github.com/lorenzosaino/go-orderedmap/blob/master/LICENSE)\n\nGo implementation of an ordered map using generics.\n\n## Implementation\n\nAn ordered map is a map that additionally maintains ordering among its entries.\nThis data structure can be used to solve a variety of problems: one very common use case is implementing LRU or LRU-like cache replacement policies.\n\nThis implementation supports O(1) lookup, update, removal, insertion to front/back, insertion before/after a specific key, move to front/back, move before/after a specific key.\n\nUnder the hood this is implemented as a combination of a map and doubly-linked list, whereby each value in the map is node of the list.\nThe list is implemented by forking the standard library [`container/list`](https://pkg.go.dev/container/list) package and adding support for generics.\n\nThis implementation is not safe for concurrent usage.\n\n## Installation\n\nYou can get this module by invoking from your terminal\n\n```\ngo get -u github.com/lorenzosaino/go-orderedmap\n```\n\nand then importing it in your code with\n\n```go\nimport orderedmap \"github.com/lorenzosaino/go-orderedmap\"\n```\n\nSince it requires generics support, you will need Go 1.18 or above.\n\n## Usage\n\nFor reference and examples, see [Go doc](https://pkg.go.dev/github.com/lorenzosaino/go-orderedmap?tab=doc).\n\n## Development\n\nYou can invoke `make help` to see all make targets provided.\n\n```\n$ make help\nall                            Run all checks and tests\nmod-upgrade                    Upgrade all vendored dependencies\nmod-update                     Ensure all used dependencies are tracked in go.{mod|sum} and vendored\nfmt-check                      Validate that all source files pass \"go fmt\"\nlint                           Run go lint\nvet                            Run go vet\nstaticcheck                    Run staticcheck\ntest                           Run all tests\ncontainer-shell                Open a shell on a Docker container\ncontainer-%                    Run any target of this Makefile in a Docker container\nhelp                           Print help\n```\n\n## License\n\n[BSD 3-clause](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzosaino%2Fgo-orderedmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzosaino%2Fgo-orderedmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzosaino%2Fgo-orderedmap/lists"}