{"id":18739270,"url":"https://github.com/1995parham/linkedlist","last_synced_at":"2025-04-12T19:53:29.362Z","repository":{"id":46247906,"uuid":"398891213","full_name":"1995parham/linkedlist","owner":"1995parham","description":"The first generic linked list in go :dancer:","archived":false,"fork":false,"pushed_at":"2025-02-17T06:28:30.000Z","size":89,"stargazers_count":31,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T19:53:25.612Z","etag":null,"topics":["generics","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1995parham.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":"2021-08-22T20:09:17.000Z","updated_at":"2025-02-17T06:28:39.000Z","dependencies_parsed_at":"2025-02-17T07:24:28.588Z","dependency_job_id":null,"html_url":"https://github.com/1995parham/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/1995parham%2Flinkedlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Flinkedlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Flinkedlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1995parham%2Flinkedlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1995parham","download_url":"https://codeload.github.com/1995parham/linkedlist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625509,"owners_count":21135513,"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":["generics","go","golang"],"created_at":"2024-11-07T15:33:12.143Z","updated_at":"2025-04-12T19:53:29.340Z","avatar_url":"https://github.com/1995parham.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Linked List, in Go \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./.github/assets/banner.png\" height=\"250px\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/1995parham/linkedlist/ci.yaml?logo=github\u0026style=for-the-badge\"\u003e\n  \u003cimg alt=\"GitHub go.mod Go version (subdirectory of monorepo)\" src=\"https://img.shields.io/github/go-mod/go-version/1995parham/linkedlist?style=for-the-badge\u0026logo=go\"\u003e\n  \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/1995parham/linkedlist?logo=codecov\u0026style=for-the-badge\"\u003e\n\u003c/p\u003e\n\nAs you know generics will come to go 1.18 and one of the major drawbacks in go was implementing data structure\nbecause of the lack of generics.\nI implemented a small generic linked list in go and I think we can start having brand new data structures in Go.\n\n## ~gotip~\n\nFirst of all you need to install the master version of golang\nand for this you can use `gotip`.\n\n```sh\ngo install golang.org/dl/gotip@latest\ngotip download\n```\n\nthen you can use the `gotip` command as your normal `go` command.\n\n## Examples\n\n```go\nfunc main() {\n        l := list.New[int]()\n\n        l.PushFront(10)\n        l.PushFront(20)\n        l.PushFront(40)\n\n        fmt.Println(l)\n}\n```\n\n```go\nfunc main() {\n        l := list.New[string]()\n\n        l.PushFront(\"hello\")\n\n        fmt.Println(l)\n}\n```\n\n```go\nfunc main() {\n        l := list.New[int]()\n\n        l.PushFront(10)\n        l.PushFront(20)\n        l.PushFront(40)\n        l.PushFront(42)\n\n        fmt.Println(l)\n\n        s := l.Filter(func(i int) bool {\n                return i%10 == 0\n        })\n\n        fmt.Println(s)\n}\n```\n\n## Related Issues\n\n- \u003chttps://github.com/golang/go/issues/47896\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham%2Flinkedlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1995parham%2Flinkedlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1995parham%2Flinkedlist/lists"}