{"id":21691509,"url":"https://github.com/scientific-dev/gocollection","last_synced_at":"2025-06-19T07:38:05.011Z","repository":{"id":57564200,"uuid":"334924784","full_name":"scientific-dev/gocollection","owner":"scientific-dev","description":"Simple key:value utility data structure for golang!","archived":false,"fork":false,"pushed_at":"2021-08-16T10:16:00.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-25T17:48:14.702Z","etag":null,"topics":["cache","collection","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/scientific-dev/gocollection","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/scientific-dev.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}},"created_at":"2021-02-01T11:17:24.000Z","updated_at":"2021-09-05T09:29:24.000Z","dependencies_parsed_at":"2022-09-16T13:47:09.261Z","dependency_job_id":null,"html_url":"https://github.com/scientific-dev/gocollection","commit_stats":null,"previous_names":["scientific-guy/gocollection"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-dev%2Fgocollection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-dev%2Fgocollection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-dev%2Fgocollection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scientific-dev%2Fgocollection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scientific-dev","download_url":"https://codeload.github.com/scientific-dev/gocollection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235581560,"owners_count":19013096,"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":["cache","collection","golang"],"created_at":"2024-11-25T17:38:54.262Z","updated_at":"2025-01-25T13:09:57.009Z","avatar_url":"https://github.com/scientific-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoCollection\n\nSimple key:value based utility data structure for golang!\n\n## Quick Example\n\nFirst install the package!\n\n```sh\ngo get github.com/scientific-dev/gocollection\n```\n\nIn your golang file!\n\n```go\npackage main\n\nimport \"fmt\"\nimport collection \"github.com/scientific-dev/gocollection\"\n\nfunc main() {\n    col := collection.Collection()\n    col.Set(\"foo\", \"bar\")\n    fmt.Println(col.Get(\"foo\")) // Will return \"bar\"\n}\n```\n\nIt is basically a better version of `map` in golang! GoCollection uses `map[string]interface{}` as a map typing!\n\n### Storing structs\n\nSo incase if you are not aware how to store structs using this, here is quick tuto\n\n```go\npackage main\n\nimport \"fmt\"\nimport collection \"github.com/scientific-dev/gocollection\"\n\ntype SimpleStruct struct{\n    field string\n}\n\nfunc main() {\n    col := collection.Collection()\n    col.Set(\"foo\", SimpleStruct{ field: \"string\" })\n    \n    fmt.Println(col.Get(\"foo\").(SimpleStruct).field) // You can use the basic type conversion of golang for this!\n}\n```\n\n## Support\n\nAny kind of doubts on this package, you can make an issue in the github repo or join our discord server and ask us doubts!\n\n**Discord Server:** [https://discord.gg/FrduEZd](https://discord.gg/FrduEZd)\u003cbr/\u003e\n**GitHub Repo:** [https://github.com/scientific-dev/gocollection/](https://github.com/scientific-dev/gocollection)\u003cbr/\u003e\n**Docs:** [https://github.com/scientific-dev/gocollection/wiki/Go-Collection](https://github.com/scientific-dev/gocollection/wiki/Go-Collection)\u003cbr/\u003e\n**Golang:** [https://pkg.go.dev/github.com/scientific-dev/gocollection](https://pkg.go.dev/github.com/scientific-dev/gocollection)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientific-dev%2Fgocollection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscientific-dev%2Fgocollection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscientific-dev%2Fgocollection/lists"}