Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
FormatBytes converts a byte count to a human-readable string using binary units (1024).
func MaskAccountID ¶
MaskAccountID masks sensitive account ID information, showing only the first 4 and last 4 characters with asterisks in between.
Types ¶
type ProgressReader ¶
type ProgressReader struct {
io.Reader
Progress *TransferProgress
}
type ProgressWriter ¶
type ProgressWriter struct {
io.Writer
Progress *TransferProgress
}
type TransferProgress ¶
type TransferProgress struct {
Total int64
Transfer int64
StartTime time.Time
Speed float64 // bytes per second
Width int
}
func NewTransferProgress ¶
func NewTransferProgress(total int64) *TransferProgress
func (*TransferProgress) Add ¶
func (p *TransferProgress) Add(n int64)
func (*TransferProgress) ETA ¶
func (p *TransferProgress) ETA() time.Duration
func (*TransferProgress) FormatBar ¶
func (p *TransferProgress) FormatBar() string
func (*TransferProgress) Percent ¶
func (p *TransferProgress) Percent() float64
func (*TransferProgress) PrintTo ¶
func (p *TransferProgress) PrintTo(w io.Writer)
Click to show internal directories.
Click to hide internal directories.