Need help with ioprogress?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

mitchellh
475 Stars 35 Forks MIT License 20 Commits 1 Opened issues

Description

Go (golang) package for progress bars around io.Reader/Writers.

Services available

!
?

Need anything else?

Contributors list

# 617
Ruby
Go
Terrafo...
Vagrant
12 commits
# 44,316
C
Go
pods
sed
1 commit
# 251,518
rubygem...
Shell
c-plus-...
Perl
1 commit
# 11,070
Go
Docker
tcl
bittorr...
1 commit
# 18,286
Go
Kuberne...
oci
pods
1 commit

ioprogress

ioprogress is a Go (golang) library with implementations of

io.Reader
and
io.Writer
that draws progress bars. The primary use case for these are for CLI applications but alternate progress bar writers can be supplied for alternate environments.

Example

Progress

Installation

Standard

go get
:
$ go get github.com/mitchellh/ioprogress

Usage

Here is an example of outputting a basic progress bar to the CLI as we're "downloading" from some other

io.Reader
(perhaps from a network connection):
// Imagine this came from some external source, such as a network connection,
// and that we have the full size of it, such as from a Content-Length HTTP
// header.
var r io.Reader

// Create the progress reader progressR := &ioprogress.Reader{ Reader: r, Size: rSize, }

// Copy all of the reader to some local file f. As it copies, the // progressR will write progress to the terminal on os.Stdout. This is // customizable. io.Copy(f, progressR)

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.