Documentation
¶
Overview ¶
Package progress provides progress reporting functionality
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadCloser ¶
Reader returns an io.ReadCloser that copies every byte read into a progress bar.
Types ¶
type ConsoleReporter ¶
type ConsoleReporter struct{}
ConsoleReporter implements Reporter by printing messages to console
func NewConsoleReporter ¶
func NewConsoleReporter() *ConsoleReporter
NewConsoleReporter creates a new ConsoleReporter
func (*ConsoleReporter) End ¶
func (r *ConsoleReporter) End()
func (*ConsoleReporter) Error ¶
func (r *ConsoleReporter) Error(message string)
func (*ConsoleReporter) Start ¶
func (r *ConsoleReporter) Start(message string)
func (*ConsoleReporter) Step ¶
func (r *ConsoleReporter) Step(message string)
func (*ConsoleReporter) Success ¶
func (r *ConsoleReporter) Success(message string)
type NopReporter ¶
type NopReporter struct{}
NopReporter implements Reporter with no-op operations
func (*NopReporter) End ¶
func (r *NopReporter) End()
func (*NopReporter) Error ¶
func (r *NopReporter) Error(message string)
func (*NopReporter) Start ¶
func (r *NopReporter) Start(message string)
func (*NopReporter) Step ¶
func (r *NopReporter) Step(message string)
func (*NopReporter) Success ¶
func (r *NopReporter) Success(message string)
type Reporter ¶
type Reporter interface {
// Start begins progress reporting with an initial message
Start(message string)
// Step reports a new step in the operation
Step(message string)
// Error reports an error condition
Error(message string)
// Success reports successful completion
Success(message string)
// End finalizes progress reporting
End()
}
Reporter defines the interface for reporting progress. It provides methods to report different stages of an operation and its status.
Click to show internal directories.
Click to hide internal directories.