{"id":19137844,"url":"https://github.com/snakeice/gogress","last_synced_at":"2025-05-06T20:24:35.914Z","repository":{"id":57525176,"uuid":"241459434","full_name":"snakeice/gogress","owner":"snakeice","description":"Golang multi progress ","archived":false,"fork":false,"pushed_at":"2024-05-30T04:11:51.000Z","size":77,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T17:18:17.816Z","etag":null,"topics":["go","golang","multiprogress","progress","progressbar"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snakeice.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":"2020-02-18T20:22:54.000Z","updated_at":"2024-05-30T04:11:54.000Z","dependencies_parsed_at":"2024-05-30T06:52:34.032Z","dependency_job_id":null,"html_url":"https://github.com/snakeice/gogress","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakeice%2Fgogress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakeice%2Fgogress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakeice%2Fgogress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snakeice%2Fgogress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snakeice","download_url":"https://codeload.github.com/snakeice/gogress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252762720,"owners_count":21800363,"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":["go","golang","multiprogress","progress","progressbar"],"created_at":"2024-11-09T06:40:46.707Z","updated_at":"2025-05-06T20:24:35.894Z","avatar_url":"https://github.com/snakeice.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gogress\n\n\nSimple terminal progress bar with Go.\n\nFeatures:\n\n- Customizable progress bar\n- Multi-progress bar\n- Multi-threaded multi-progress bar\n- IO wrapper\n\nBased on [cheggaaa/pb](https://github.com/cheggaaa/pb)\n\n# Sample usage - Simple progress bar\n\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/snakeice/gogress\"\n)\n\nconst TOTAL = 500\n\nfunc main() {\n\tbar := gogress.New(TOTAL)\n\tbar.Start()\n\tbar.Prefix(\"Downloading life\")\n\tfor i := 1; i \u003c= TOTAL; i++ {\n\t\tbar.Inc()\n\t\ttime.Sleep(time.Second / 120)\n\t}\n\tbar.FinishPrint(\"All Solved\")\n}\n```\n\n[![asciicast](https://asciinema.org/a/wqZKNwxiQErdrVG4fDlFdQqLZ.svg)](https://asciinema.org/a/wqZKNwxiQErdrVG4fDlFdQqLZ)\n\n# Sample decorator\n\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t\"github.com/snakeice/gogress\"\n\t\"github.com/snakeice/gogress/format\"\n)\n\nconst TOTAL = 500\n\nfunc main() {\n\tbarFormat := format.ProgressFormat{\n\t\tBoxStart:   \"|\",\n\t\tBoxEnd:     \"|\",\n\t\tEmpty:      \"_\",\n\t\tCurrent:    \"\u003e\",\n\t\tCompleted:  \"-\",\n\t\tSpinString: \"\\\\|/-\",\n\t}\n\n\ttemplate := `{{prefix . 2 | green }} {{spin . 1 | rndcolor }}  {{percent . 1 | cyan }} {{counter . 1 | red }} {{speed . 1 | blue}}`\n\n\tbar := gogress.New(TOTAL)\n\n\tif err := bar.SetTemplate(template); err != nil {\n\t\tpanic(err)\n\t}\n\n\tbar.Format = barFormat\n\tbar.Prefix(\"Processing\")\n\n\tbar.Start()\n\tbar.Prefix(\"Downloading life\")\n\tfor i := 1; i \u003c= TOTAL; i++ {\n\t\tbar.Inc()\n\t\ttime.Sleep(time.Second / 120)\n\t}\n\tbar.FinishPrint(\"All Solved\")\n}\n```\n\n[![asciicast](https://asciinema.org/a/BjDqCQYQyQGZJeD3D61absJfq.svg)](https://asciinema.org/a/BjDqCQYQyQGZJeD3D61absJfq)\n\n# Sample usage - Multi-progress bar\n\n```go\npackage main\n\nimport (\n\t\"math/rand\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/snakeice/gogress\"\n)\n\nconst (\n\tTOTAL = 100\n\tBARS  = 3\n)\n\nfunc processBar(bar *gogress.Progress) {\n\tfor bar.GetMax() \u003e bar.GetCurrent() {\n\t\tbar.Inc()\n\t\ttime.Sleep(time.Millisecond * time.Duration(rand.Intn(100)))\n\t}\n\n\tbar.Finish()\n}\n\nfunc main() {\n\tpool := gogress.NewPool()\n\tpool.Start()\n\tfor i := 0; i \u003c BARS; i++ {\n\t\tbar := pool.NewBar(TOTAL)\n\t\tbar.Prefix(\"Processing \" + strconv.Itoa(i))\n\t\tgo processBar(bar)\n\t}\n\n\tbar := pool.NewBar(TOTAL)\n\tbar.Add(50).Prefix(\"Other processing\")\n\tprocessBar(bar)\n\tpool.RemoveBar(bar)\n\n\tpool.Wait()\n\n}\n```\n\n[![asciicast](https://asciinema.org/a/REaVd9hpZ6iEZN6LYz0uqEG4B.svg)](https://asciinema.org/a/REaVd9hpZ6iEZN6LYz0uqEG4B)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakeice%2Fgogress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnakeice%2Fgogress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnakeice%2Fgogress/lists"}