Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
FormatBytes formats a byte count as a human-readable string (e.g., "1.5 MB").
func FormatDuration ¶
FormatDuration formats a duration as a human-readable string (e.g., "1m 30s").
func FormatSpeed ¶
FormatSpeed formats a speed as a human-readable string (e.g., "1.5 MB/s").
Types ¶
type ProgressReader ¶
type ProgressReader struct {
// contains filtered or unexported fields
}
ProgressReader wraps an io.Reader and periodically reports upload progress.
func NewProgressReader ¶
func NewProgressReader(r io.Reader, onProgress func(Progress)) *ProgressReader
NewProgressReader creates a new progress tracking reader that wraps the given io.Reader.
func (*ProgressReader) GetProgress ¶
func (pr *ProgressReader) GetProgress() Progress
GetProgress returns the current progress snapshot.
Click to show internal directories.
Click to hide internal directories.