Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

multibar

> 编程语言
Open source

Display multiple progress bars in Go (golang).

372 stars0 likes1 views
WebsiteGitHub

About

Display multiple progress bars in Go (golang).

MultiBar

Display progress bars in Go

$ go run main.go
here we have a progress bar

some work  30% [====================>-------------------------------------------] 925ms
and here we have another progress bar
here we have a longer prepend string  25% [==========>--------------------------] 911ms
working...  19% [=============>-------------------------------------------------] 911ms

Display Options:

When you call .MakeBar(total int, prepend string), the returned progress bar has options that you can change to fit your needs. Here are the defaults:

- Width:           screen width - len(prepend) - 20
- Total:           total (passed in)
- Prepend:         prepend (passed in)
- LeftEnd:         '['
- RightEnd:        ']'
- Fill:            '='
- Head:            '>'
- Empty:           '-'
- ShowPercent:     true
- ShowTimeElapsed: true

Example usage:

(note, in the example gif, we are manually resetting the terminal mode. We NO LONGER have to, issue fixed)

You can run this with cd demo; go run main.go.

…

Idiosyncrasies

When you run tests, a lot of terminal cursor movement happens. This will cause the output to look all kinds of messed up. In most unix systems, clear or cmd+k should clear out the output.

License

See LICENSE.md

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言