Ecosyste.ms: Packages

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

proxy.golang.org : 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.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/libfor/progress
Keywords: golang, interface, progress-bar, standard
License: MIT
Latest release: about 1 year ago
First release: about 1 year ago
Namespace: github.com/libfor
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 15 days ago

    Loading...
    Readme
    Loading...