{"id":37817128,"url":"https://github.com/wwwangxc/container","last_synced_at":"2026-01-16T15:39:00.382Z","repository":{"id":62866944,"uuid":"557185937","full_name":"wwwangxc/container","owner":"wwwangxc","description":"Various data structures implemented using Go.","archived":false,"fork":false,"pushed_at":"2023-04-18T01:43:22.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T02:11:07.795Z","etag":null,"topics":["data-structures","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wwwangxc.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-10-25T08:24:20.000Z","updated_at":"2023-04-16T07:03:21.000Z","dependencies_parsed_at":"2024-06-20T01:55:05.201Z","dependency_job_id":null,"html_url":"https://github.com/wwwangxc/container","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wwwangxc/container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwangxc%2Fcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwangxc%2Fcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwangxc%2Fcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwangxc%2Fcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wwwangxc","download_url":"https://codeload.github.com/wwwangxc/container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwwangxc%2Fcontainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["data-structures","go","golang"],"created_at":"2026-01-16T15:39:00.280Z","updated_at":"2026-01-16T15:39:00.368Z","avatar_url":"https://github.com/wwwangxc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![OSCS Status](https://www.oscs1024.com/platform/badge/wwwangxc/container.svg?size=small)](https://www.murphysec.com/dr/aDgidkK7d72WfN9WRi)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wwwangxc/container)](https://goreportcard.com/report/github.com/wwwangxc/container)\n[![GoDoc](https://pkg.go.dev/badge/github.com/wwwangxc/container?status.svg)](https://pkg.go.dev/github.com/wwwangxc/container)\n\nVarious data structures implemented using Go generics. 🤗\n\n## Support\n\n- [List](doc/list.md#list)\n  - [Array List](doc/list.md#array-list)\n  - [Singly Linked List](doc/list.md#singly-linked-list)\n  - [Doubly Linked List](doc/list.md#doubly-linked-list)\n- [Set](doc/set.md#set)\n  - [Hash Set](doc/set.md#hash-set)\n- [Map](doc/map.md#map)\n  - [Linked Map](doc/map.md#linked-map)\n- [Heap](doc/heap.md#heap)\n  - [Min Heap](doc/heap.md#min-heap)\n  - [Max Heap](doc/heap.md#max-heap)\n## Global Ability\n\n### Container\n\nIt is the base feature provided by all data structures.\n\n```go\n// Container is the base feature provided by all data structures\ntype Container[T any] interface {\n\tfmt.Stringer\n\n\t// IsEmpty will return true when container has no element\n\tIsEmpty() bool\n\n\t// Size will return the number of elements in the container\n\tSize() int\n\n\t// Clear the elements inside the container\n\tClear()\n\n\t// Values will return the collection of all element values in the container\n\tValues() []T\n}\n```\n\n### Enumerator\n\nIt provides enumerable functions for the containers.\n\n```go\n// Enumerator provides enumerable functions for the containers\ntype Enumerator[T comparable, U any] interface {\n\n\t// Each calls the given function once for each element and passing that\n\t// element's index(or key) and value\n\t//\n\t// Enter the next loop when it returns true\n\t// Break loop when it returns false\n\tEach(func(T, U) bool)\n\n\t// Any calls the given function once for each element\n\t//\n\t// Return true if the given function returns true once\n\t// Return false if the given function always returns false for all elements\n\tAny(func(T, U) bool) bool\n\n\t// All calls the given function once for each element\n\t//\n\t// Return true if the given function always returns true for all elements\n\t// Return false if the given function returns false once\n\tAll(func(T, U) bool) bool\n\n\t// First calls the given function once for each element\n\t//\n\t// Return [index(or key), value, true] when the given function return true\n\t// for the first time\n\tFind(func(T, U) bool) (T, U, bool)\n\n\t// Select calls the given function once for each element\n\t//\n\t// It will return all elements for which the given function returns true\n\tSelect(func(T, U) bool) []U\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwwangxc%2Fcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwwwangxc%2Fcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwwangxc%2Fcontainer/lists"}