ioprogress

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

  • Owner: mitchellh/ioprogress
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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)

Main metrics

Overview
Name With Ownermitchellh/ioprogress
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-12-06 22:04:04
Pushed At2021-10-30 02:37:19
Last Commit At2018-01-31 16:47:57
Release Count0
用户参与
Stargazers Count501
Watchers Count11
Fork Count33
Commits Count20
Has Issues Enabled
Issues Count2
Issue Open Count1
Pull Requests Count4
Pull Requests Open Count1
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private