{"id":27993173,"url":"https://github.com/beevik/pq","last_synced_at":"2025-07-25T21:04:50.719Z","repository":{"id":281460063,"uuid":"945351416","full_name":"beevik/pq","owner":"beevik","description":"generic priority queue in go","archived":false,"fork":false,"pushed_at":"2025-03-09T07:57:47.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T08:26:24.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beevik.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":"2025-03-09T07:56:04.000Z","updated_at":"2025-03-09T07:58:23.000Z","dependencies_parsed_at":"2025-03-09T08:37:33.870Z","dependency_job_id":null,"html_url":"https://github.com/beevik/pq","commit_stats":null,"previous_names":["beevik/pqueue"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevik%2Fpq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevik%2Fpq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevik%2Fpq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevik%2Fpq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beevik","download_url":"https://codeload.github.com/beevik/pq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253133124,"owners_count":21859108,"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":[],"created_at":"2025-05-08T18:47:30.330Z","updated_at":"2025-05-08T18:47:30.784Z","avatar_url":"https://github.com/beevik.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"pq\n==\n\nA generic implementation of a priority queue in Go. The queue is implemented\nas a min-heap, with the key value used as a priority value. Items with\nsmallest key value are dequeued first.\n\n```go\nq := pq.NewQueue[int, string]()\n\nq.Enqueue(3, \"three\")\nq.Enqueue(1, \"one\")\nq.Enqueue(5, \"five\")\n\nfmt.Printf(\"Queue size: %d\\n\", q.Count())\n\nk, v := q.Peek()\nfmt.Printf(\"Peek: %d %s\\n\", k, v)\n\nfor !q.IsEmpty() {\n    k, v = q.Dequeue()\n    fmt.Printf(\"Dequeue: %d %s\\n\", k, v)\n}\n```\n\nOutput:\n```\nQueue size: 3\nPeek: 1 one\nDequeue: 1 one\nDequeue: 3 three\nDequeue: 5 five\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeevik%2Fpq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeevik%2Fpq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeevik%2Fpq/lists"}