{"id":29661686,"url":"https://github.com/ujunglangit-id/gotong-royong","last_synced_at":"2025-07-22T10:07:42.528Z","repository":{"id":81846984,"uuid":"471885082","full_name":"titikterang/gotong-royong","owner":"titikterang","description":"to help us controll goroutine ","archived":false,"fork":false,"pushed_at":"2022-03-20T07:07:06.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T17:53:02.755Z","etag":null,"topics":["concurrency","concurrent-programming","golang","golang-examples","golang-library","goroutine","goroutine-pool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/titikterang.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-20T05:10:57.000Z","updated_at":"2022-04-02T11:14:48.000Z","dependencies_parsed_at":"2023-07-11T01:00:46.024Z","dependency_job_id":null,"html_url":"https://github.com/titikterang/gotong-royong","commit_stats":null,"previous_names":["jokogledek/gotong-royong","titikterang/gotong-royong","ujunglangit-id/gotong-royong"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/titikterang/gotong-royong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titikterang%2Fgotong-royong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titikterang%2Fgotong-royong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titikterang%2Fgotong-royong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titikterang%2Fgotong-royong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titikterang","download_url":"https://codeload.github.com/titikterang/gotong-royong/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titikterang%2Fgotong-royong/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266473105,"owners_count":23934477,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["concurrency","concurrent-programming","golang","golang-examples","golang-library","goroutine","goroutine-pool"],"created_at":"2025-07-22T10:07:42.425Z","updated_at":"2025-07-22T10:07:42.507Z","avatar_url":"https://github.com/titikterang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Overview\ngotong-royong is a simple library to help us limit goroutine\n\n### Example Code\n```go\npackage main\n\nimport (\n\t\"github.com/ujunglangit-id/gotong-royong/pkg\"\n\t\"log\"\n\t\"sync\"\n\t\"time\"\n)\n\nfunc showText() {\n\ttime.Sleep(2 * time.Second)\n\tlog.Printf(\n\t\t\"remaining queue : %d, current channel length %d, execute current task ....\\n\",\n\t\twk.GetRemainingQueueLength(), wk.GetChannelLength())\n}\n\nvar (\n\twk *pkg.WorkerContainer\n)\n\nfunc init() {\n\twk = pkg.NewWorkers(5)\n}\n\nfunc main() {\n\twg := sync.WaitGroup{}\n\twk.RunInBackground()\n\tfor i := 0; i \u003c 100; i++ {\n\t\tgo wk.AddNewEvent(showText)\n\t}\n\twg.Add(1)\n\t//your other logic / business flow in here\n\twg.Wait()\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujunglangit-id%2Fgotong-royong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fujunglangit-id%2Fgotong-royong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujunglangit-id%2Fgotong-royong/lists"}