forked from Mirrors/bubbletea
a2d0ac9d38
* docs: add another progress bar example * chore: copy edits Co-authored-by: Christian Rocha <christian@rocha.is> |
||
---|---|---|
.. | ||
README.md | ||
main.go | ||
tui.go |
README.md
Download Progress
This example demonstrates how to download a file from a URL and show its progress with a Progress Bubble.
In this case we're getting download progress with an io.TeeReader
and
sending progress Msg
s to the Program
with Program.Send()
.
How to Run
Build the application with go build .
, then run with a --url
argument
specifying the URL of the file to download. For example:
./download-progress --url="https://download.blender.org/demo/color_vortex.blend"
Note that in this example a TUI will not be shown for URLs that do not respond with a ContentLength header.
This example originally came from this discussion.
Charm热爱开源 • Charm loves open source