{"id":38034669,"url":"https://github.com/ermanimer/progress_bar","last_synced_at":"2026-01-16T19:48:06.524Z","repository":{"id":47843668,"uuid":"324314962","full_name":"ermanimer/progress_bar","owner":"ermanimer","description":"Go Progress Bar","archived":false,"fork":false,"pushed_at":"2022-08-12T16:01:10.000Z","size":258,"stargazers_count":127,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-06-18T20:20:37.980Z","etag":null,"topics":["progress-bar"],"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/ermanimer.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}},"created_at":"2020-12-25T07:45:58.000Z","updated_at":"2024-01-04T16:53:24.000Z","dependencies_parsed_at":"2022-08-28T14:03:16.898Z","dependency_job_id":null,"html_url":"https://github.com/ermanimer/progress_bar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ermanimer/progress_bar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermanimer%2Fprogress_bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermanimer%2Fprogress_bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermanimer%2Fprogress_bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermanimer%2Fprogress_bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ermanimer","download_url":"https://codeload.github.com/ermanimer/progress_bar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ermanimer%2Fprogress_bar/sbom","scorecard":{"id":381509,"data":{"date":"2025-08-11","repo":{"name":"github.com/ermanimer/progress_bar","commit":"6b35758c35d85d1db63737584b7cd3bbe4e81b13"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ermanimer/progress_bar/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ermanimer/progress_bar/go.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T15:33:25.613Z","repository_id":47843668,"created_at":"2025-08-18T15:33:25.613Z","updated_at":"2025-08-18T15:33:25.613Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481964,"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":["progress-bar"],"created_at":"2026-01-16T19:48:06.445Z","updated_at":"2026-01-16T19:48:06.516Z","avatar_url":"https://github.com/ermanimer.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# progress_bar\n\n![Go](https://github.com/ermanimer/progress_bar/workflows/Go/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ermanimer/progress_bar)](https://goreportcard.com/report/github.com/ermanimer/progress_bar)\n\nGo Progress Bar\n\n## Features\nprogress_bar creates a single customizable progress bar for Unix terminal.\n\n## Installation\n```bash\ngo get -u github.com/ermanimer/progress_bar\n```\n\n## Functions\n#### DefaultProgressBar(totalValue float64) *ProgressBar\nCreates a progress bar with default parameters and given total value.\n\n|Parameter |Description                 |\n|:---------|:---------------------------|\n|totalValue|Total value of progress bar|\n\nDefault parameters:\n\n|Default Parameter       |Value                                                                            |\n|:-----------------------|:--------------------------------------------------------------------------------|\n|Default Schema          |[{bar}][{percent}][{current}/{total}][Elapsed: {elapsed}s Remaining:{remaining}s]|\n|Default Filled Character|#                                                                                |\n|Default Blank Character |.                                                                                |\n|Default Length          |50                                                                               |\n\n#### NewProgressBar(output io.Writer, schema string, filledCharacter string, blankCharacter string, length float64, totalValue float64) *ProgressBar\nCreates a progress bar with default parameters and given total value.\n\n|Parameter      |Description                     |\n|:--------------|:-------------------------------|\n|output         |Output of progress bar          |\n|schema         |Schema of progress bar          |\n|filledCharacter|Filled character of progress bar|\n|blankCharacter |Blank character of progress bar |\n|length         |Length of progress bar          |\n|totalValue     |Total value of progress bar     |\n\nSchema Variables:\n\n|Schema Variable|Value                                                                            |\n|:--------------|:----------------------------|\n|{bar}          |Bar of progress bar          |\n|{percent}      |Percentage of progress bar   |\n|{current}      |Current value of progress bar|\n|{total}        |Total value of progress bar  |\n|{elapsed}      |Elapsed duration             |\n|{remaining}    |Estimated remaining duration |\n\n## Methods\n#### Start() error\nStarts progress bar.\n\n#### Stop() error\nStops progress bar.\n\n#### Update(value float64) error\nUpdates progress bar with given value and stops progress bar is total value is reached.\n\n|Parameter|Description                  |\n|:--------|:----------------------------|\n|value    |Current value of progress bar|\n\n## Usage\n#### Default Progress Bar:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/ermanimer/progress_bar\"\n)\n\nfunc main() {\n\t//create new progress bar\n\tpb := progress_bar.DefaultProgressBar(100)\n\t//start\n\terr := pb.Start()\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn\n\t}\n\t//update\n\tfor value := 1; value \u003c= 100; value++ {\n\t\ttime.Sleep(20 * time.Millisecond)\n\t\terr := pb.Update(float64(value))\n\t\tif err != nil {\n\t\t\tfmt.Println(err.Error())\n\t\t\tbreak\n\t\t}\n\t}\n}\n```\n\nTerminal Output:\n![Default Terminal Output](/images/default.gif)\n\n#### New Progress Bar:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/ermanimer/progress_bar\"\n)\n\nfunc main() {\n\t//create parameters\n\toutput := os.Stdout\n\tschema := \"({bar}) ({percent}) ({current} of {total} completed)\"\n\tfilledCharacter := \"=\"\n\tblankCharacter := \"-\"\n\tvar length float64 = 60\n\tvar totalValue float64 = 80\n\t//create new progress bar\n\tpb := progress_bar.NewProgressBar(output, schema, filledCharacter, blankCharacter, length, totalValue)\n\t//start\n\terr := pb.Start()\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn\n\t}\n\t//update\n\tfor value := 1; value \u003c= 80; value++ {\n\t\ttime.Sleep(20 * time.Millisecond)\n\t\terr := pb.Update(float64(value))\n\t\tif err != nil {\n\t\t\tfmt.Println(err.Error())\n\t\t\tbreak\n\t\t}\n\t}\n}\n```\n\nTerminal Output:\n![New Terminal Output](/images/new.gif)\n\n## References\n- [ANSI Escape Codes, Wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code)\n- [Build Your Own Command Line With ANSI Escape Codes, Haoyi's Programming Blog](https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fermanimer%2Fprogress_bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fermanimer%2Fprogress_bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fermanimer%2Fprogress_bar/lists"}