Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressStyle ¶
type ProgressStyle string
ProgressStyle represents different progress bar styles
const ( StyleBasic ProgressStyle = "basic" // [=====> ] StyleBlocks ProgressStyle = "blocks" // █████░░░░░ StyleModern ProgressStyle = "modern" // ○○●●●○○○ StyleEmoji ProgressStyle = "emoji" // 🟦🟦🟦⬜⬜ StyleMinimal ProgressStyle = "minimal" // 43% | 4.2MB/s )
func ValidStyles ¶
func ValidStyles() []ProgressStyle
ValidStyles returns a list of valid progress bar styles
type ProgressTracker ¶
type ProgressTracker struct { TotalSize int64 UploadedSize int64 StartTime time.Time LastUpdate time.Time Style ProgressStyle CustomEmoji string Width int LastChunkSize int64 LastSpeed float64 }
ProgressTracker keeps track of upload progress
func NewProgressTracker ¶
func NewProgressTracker(totalSize int64, style ProgressStyle) *ProgressTracker
NewProgressTracker creates a new progress tracker
func (*ProgressTracker) Finish ¶
func (p *ProgressTracker) Finish()
Finish prints final progress and moves to next line
func (*ProgressTracker) UpdateProgress ¶
func (p *ProgressTracker) UpdateProgress(uploadedSize int64)
UpdateProgress updates the progress and displays the progress bar
Click to show internal directories.
Click to hide internal directories.