An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/libfor/progress

Package progress offers a simple, standardized interface for monitoring progress in your applications. This package exposes the progress.Reader interface, designed to be similar in spirit to io.Reader but for progress reporting. This interface makes tracking long-running tasks and their progress a breeze. The interface defines two key methods: - DoneChan() returns a channel that signals when the task is done, and a boolean indicating if the task is completed. - Count() provides the current count of finished tasks and the total number of tasks. In addition to the interface, the package provides several useful tools: - progress.NewLongRunningJob: A concurrency-safe utility for instrumenting long-running functions with a progress.Reader. - progress.Extend(Reader): A simple wrapper that adds useful methods to a Reader, such as estimating remaining time. - progress.Logger(Reader): Starts a goroutine to log updates from a Reader. - progress.WaitGroup: A drop-in replacement for sync.WaitGroup that implements the Reader interface. By using this package, you can make your long-running tasks and functions more informative and user-friendly, improving the overall experience for your library consumers. For those interested in contributing, there are several areas where the functionality of this package could be extended, such as satisfying progress.Reader with just a count, returning a progress.Reader from a slice or channel, creating a pretty terminal progress bar, or experimenting with passing return types through.

Ecosystem
proxy.golang.org
Latest Release
v0.1.0-beta
almost 3 years ago
Versions
2
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/libfor/progress
spec
License MIT
Namespace github.com/libfor
First Release almost 3 years ago
Last Synced 16 days ago
Repository
Stars 0 on GitHub
Forks 0 on GitHub