mirror of
https://github.com/bit1001/tdl.git
synced 2025-09-19 12:44:27 +08:00
chore(progress): reduce tracker length
This commit is contained in:
parent
d81c5d072e
commit
40097c6cea
2 changed files with 3 additions and 4 deletions
|
@ -10,14 +10,13 @@ import (
|
|||
func New() progress.Writer {
|
||||
pw := progress.NewWriter()
|
||||
pw.SetAutoStop(true)
|
||||
pw.SetTrackerLength(25)
|
||||
pw.SetMessageWidth(40)
|
||||
pw.SetTrackerLength(20)
|
||||
pw.SetMessageWidth(35)
|
||||
pw.SetStyle(progress.StyleDefault)
|
||||
pw.SetTrackerPosition(progress.PositionRight)
|
||||
pw.SetUpdateFrequency(time.Millisecond * 100)
|
||||
pw.Style().Colors = progress.StyleColorsExample
|
||||
pw.Style().Options.PercentFormat = "%4.1f%%"
|
||||
pw.Style().Options.ETAString = "Remaining"
|
||||
pw.Style().Visibility.TrackerOverall = true
|
||||
pw.Style().Visibility.ETA = true
|
||||
pw.Style().Visibility.ETAOverall = false
|
||||
|
|
|
@ -11,7 +11,7 @@ func AppendTracker(pw progress.Writer, message string, total int64) *progress.Tr
|
|||
units.Formatter = utils.Byte.FormatBinaryBytes
|
||||
|
||||
tracker := progress.Tracker{
|
||||
Message: color.BlueString("%s - %s", utils.Byte.FormatBinaryBytes(total), message),
|
||||
Message: color.BlueString(message),
|
||||
Total: total,
|
||||
Units: units,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue