{"id":22387407,"url":"https://github.com/martinohmann/collections-go","last_synced_at":"2025-07-15T15:43:47.090Z","repository":{"id":144201731,"uuid":"212871947","full_name":"martinohmann/collections-go","owner":"martinohmann","description":"Golang collections for builtin types and generic slices","archived":false,"fork":false,"pushed_at":"2019-11-03T10:23:45.000Z","size":171,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T02:03:43.152Z","etag":null,"topics":["generic-collections","golang-collections","immutable-collections","mutable-collections"],"latest_commit_sha":null,"homepage":"","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/martinohmann.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},"funding":{"github":"martinohmann"}},"created_at":"2019-10-04T17:47:27.000Z","updated_at":"2021-08-13T08:44:00.000Z","dependencies_parsed_at":"2023-06-18T04:30:35.369Z","dependency_job_id":null,"html_url":"https://github.com/martinohmann/collections-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martinohmann/collections-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Fcollections-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Fcollections-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Fcollections-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Fcollections-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinohmann","download_url":"https://codeload.github.com/martinohmann/collections-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinohmann%2Fcollections-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265443560,"owners_count":23766417,"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":["generic-collections","golang-collections","immutable-collections","mutable-collections"],"created_at":"2024-12-05T02:09:07.017Z","updated_at":"2025-07-15T15:43:47.079Z","avatar_url":"https://github.com/martinohmann.png","language":"Go","funding_links":["https://github.com/sponsors/martinohmann"],"categories":[],"sub_categories":[],"readme":"collections-go\n==============\n\n[![Build Status](https://travis-ci.org/martinohmann/collections-go.svg?branch=master)](https://travis-ci.org/martinohmann/collections-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/martinohmann/collections-go?style=flat)](https://goreportcard.com/report/github.com/martinohmann/collections-go)\n[![GoDoc](https://godoc.org/github.com/martinohmann/collections-go?status.svg)](https://godoc.org/github.com/martinohmann/collections-go)\n\nMutable and immutable collections for commonly used builtin types. This package\nincludes collection types generated by\n[collections-gen](https://github.com/martinohmann/collections-gen) for the\nfollowing builtins:\n\n- `byte` ([`collections.Byte`](collections/byte.go), [`collections.ImmutableByte`](collections/immutable_byte.go))\n- `[]byte` ([`collections.ByteSlice`](collections/byte_slice.go), [`collections.ImmutableByteSlice`](collections/immutable_byte_slice.go))\n- `float32` ([`collections.Float32`](collections/float32.go), [`collections.ImmutableFloat32`](collections/immutable_float32.go))\n- `float64` ([`collections.Float64`](collections/float64.go), [`collections.ImmutableFloat64`](collections/immutable_float64.go))\n- `int` ([`collections.Int`](collections/int.go), [`collections.ImmutableInt`](collections/immutable_int.go))\n- `int64` ([`collections.Int64`](collections/int64.go), [`collections.ImmutableInt64`](collections/immutable_int64.go))\n- `int32` ([`collections.Int32`](collections/int32.go), [`collections.ImmutableInt32`](collections/immutable_int32.go))\n- `string` ([`collections.String`](collections/string.go), [`collections.ImmutableString`](collections/immutable_string.go))\n\nIn addition to that the following hand crafted collection types are included:\n\n- generic collections based on `interface{}` types and the `reflect` package\n  ([`collections.Generic`](collections/generic.go),\n  [`collections.ImmutableGeneric`](collections/immutable.go))\n\nInstallation\n------------\n\n```sh\ngo get github.com/martinohmann/collections-go\n```\n\nUsage\n-----\n\n```go\nc := collections.NewString([]string{\"foo\", \"bar\", \"baz\"})\n\nitems := c.\n    Filter(func(item string) bool {\n        return strings.HasPrefix(item, \"ba\")\n    }).\n    Reverse().\n    Prepend(\"qux\").\n    Items()\n\nfmt.Println(items)\n\n// Output:\n// [qux baz bar]\n```\n\nCheck out the\n[godocs](https://godoc.org/github.com/martinohmann/collections-go/collections)\nfor all available collection methods.\n\nLicense\n-------\n\nThe source code of collections-go is released under the MIT License. See the\nbundled LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinohmann%2Fcollections-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinohmann%2Fcollections-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinohmann%2Fcollections-go/lists"}