{"id":23388387,"url":"https://github.com/xuoe/go-ring","last_synced_at":"2025-10-10T02:32:27.191Z","repository":{"id":59043467,"uuid":"517038148","full_name":"xuoe/go-ring","owner":"xuoe","description":"Generic Ring Buffer","archived":false,"fork":false,"pushed_at":"2022-10-10T13:17:08.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T18:36:58.964Z","etag":null,"topics":["circular-buffer","ring-buffer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-23T11:25:39.000Z","updated_at":"2022-08-22T20:04:31.000Z","dependencies_parsed_at":"2022-09-11T04:41:42.476Z","dependency_job_id":null,"html_url":"https://github.com/xuoe/go-ring","commit_stats":null,"previous_names":["xuoe/ring"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xuoe/go-ring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuoe%2Fgo-ring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuoe%2Fgo-ring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuoe%2Fgo-ring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuoe%2Fgo-ring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuoe","download_url":"https://codeload.github.com/xuoe/go-ring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuoe%2Fgo-ring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002540,"owners_count":26083400,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["circular-buffer","ring-buffer"],"created_at":"2024-12-22T02:19:40.520Z","updated_at":"2025-10-10T02:32:27.163Z","avatar_url":"https://github.com/xuoe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/xuoe/go-ring.svg)](https://pkg.go.dev/github.com/xuoe/go-ring)\n\nThis library provides a generic [ring buffer](https://en.wikipedia.org/wiki/Circular_buffer) implementation.\n\n### API\n\n```go\nfunc New(int) *Buffer[T]\nfunc FromSlice([]T) *Buffer[T]\nfunc WrapSlice([]T) *Buffer[T]\n\nfunc (*Buffer[T]) Push(T) (T, bool)\nfunc (*Buffer[T]) Pop() (T, bool)\nfunc (*Buffer[T]) Head() (T, bool)\nfunc (*Buffer[T]) Tail() (T, bool)\nfunc (*Buffer[T]) Get(int) T\nfunc (*Buffer[T]) Cap() int\nfunc (*Buffer[T]) Len() int\nfunc (*Buffer[T]) Empty() bool\nfunc (*Buffer[T]) Full() bool\nfunc (*Buffer[T]) Offset() int\nfunc (*Buffer[T]) SetOffset(int)\nfunc (*Buffer[T]) ToSlice() []T\n```\n\nSee [the docs](https://pkg.go.dev/github.com/xuoe/go-ring) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuoe%2Fgo-ring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuoe%2Fgo-ring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuoe%2Fgo-ring/lists"}