proxy.golang.org : github.com/cloudbees/progressio
Package progressio contains io.Reader and io.Writer wrappers to easily get progress feedback, including speed/sec, average speed, %, time remaining, size, transferred size, ... over a channel in a progressio.Progress object. Important note is that the returned object implements the io.Closer interface and you have to close the progressio.ProgressReader and progressio.ProgressWriter objects in order to clean everything up. Usage is pretty simple: A helper function is available that opens a file, determines it's size, and wraps it's os.File io.Reader object: A wrapper for an io.WriterCloser is available too, but no helper function is available to write to an os.File since the target size is not known. Usually, wrapping the io.Writer is more accurate, since writing potentially takes up more time and happens last. Useage is similar to wrapping the io.Reader: Note that you can also implement your own formatting. See the String() function implementation or consult the Progress struct layout and documentation
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/cloudbees/progressio
License: MIT
Latest release: over 5 years ago
First release: over 5 years ago
Namespace: github.com/cloudbees
Last synced: 4 days ago