{"id":13644352,"url":"https://github.com/fabienjuif/go-linkedlist","last_synced_at":"2025-03-29T17:42:51.166Z","repository":{"id":65712014,"uuid":"597844902","full_name":"fabienjuif/go-linkedlist","owner":"fabienjuif","description":"Simple LinkedList in Go","archived":false,"fork":false,"pushed_at":"2023-02-05T20:02:40.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:48:54.365Z","etag":null,"topics":["go","linkedlist","simple","threadsafe"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabienjuif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-02-05T19:58:57.000Z","updated_at":"2023-02-06T08:16:45.000Z","dependencies_parsed_at":"2023-02-19T01:46:06.305Z","dependency_job_id":null,"html_url":"https://github.com/fabienjuif/go-linkedlist","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/fabienjuif%2Fgo-linkedlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabienjuif%2Fgo-linkedlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabienjuif%2Fgo-linkedlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabienjuif%2Fgo-linkedlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabienjuif","download_url":"https://codeload.github.com/fabienjuif/go-linkedlist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223267,"owners_count":20743158,"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","linkedlist","simple","threadsafe"],"created_at":"2024-08-02T01:02:01.767Z","updated_at":"2025-03-29T17:42:51.149Z","avatar_url":"https://github.com/fabienjuif.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-linkedlist\n\n![build \u0026 test](https://github.com/fabienjuif/go-linkedlist/actions/workflows/simple.yml/badge.svg)\n\n\u003e Simple LinkedList in Go\n\n## Install\n\n```sh\ngo get github.com/fabienjuif/go-linkedlist\n```\n\n## Thread safety\n\nThe Linked List is thread safe but the Iterator is not.\n\nIf you update the Linked List while Iterate over it you may notice strange behaviour.\n\n## Example\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/fabienjuif/go-linkedlist\"\n)\n\ntype Song struct {\n\ttitle  string\n\tartist string\n}\n\nfunc main() {\n\t// best 2000 rock songs according to https://us.napster.com/blog/post/the-50-best-rock-songs-of-2000\n\tll := linkedlist.NewLinkedList[Song]()\n\tll.Append(\u0026Song{\n\t\ttitle:  \"Californication\",\n\t\tartist: \"Red Hot Chili Peppers\",\n\t})\n\tll.Append(\u0026Song{\n\t\ttitle:  \"It's My Life\",\n\t\tartist: \"Bon Jovi\",\n\t})\n\tll.Append(\u0026Song{\n\t\ttitle:  \"Beautiful Day\",\n\t\tartist: \"U2\",\n\t})\n\n\tfmt.Println(\"iterate in order\")\n\titerator := ll.NewIterator()\n\tfor iterator.Next() {\n\t\tfmt.Printf(\"%v\\n\", iterator.Get())\n\t}\n\n\tfmt.Println(\"\\niterate in reverse order\")\n\titerator = ll.NewIterator()\n\tfor iterator.Prev() {\n\t\tfmt.Printf(\"%v\\n\", iterator.Get())\n\t}\n}\n```\n\n```txt\niterate in order\n\u0026{Californication Red Hot Chili Peppers}\n\u0026{It's My Life Bon Jovi}\n\u0026{Beautiful Day U2}\n\niterate in reverse order\n\u0026{Beautiful Day U2}\n\u0026{It's My Life Bon Jovi}\n\u0026{Californication Red Hot Chili Peppers}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienjuif%2Fgo-linkedlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabienjuif%2Fgo-linkedlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienjuif%2Fgo-linkedlist/lists"}