clean up unessesary comments
This commit is contained in:
parent
c9f45abef3
commit
350aec772b
1 changed files with 2 additions and 6 deletions
|
@ -44,15 +44,11 @@ func run(model string) error {
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
progressData = progress
|
progressData = progress
|
||||||
if bar == nil {
|
if bar == nil {
|
||||||
uiprogress.Start() // start rendering
|
uiprogress.Start()
|
||||||
bar = uiprogress.AddBar(int(progress.Total)) // Add a new bar
|
bar = uiprogress.AddBar(int(progress.Total))
|
||||||
|
|
||||||
// display the total file size and how much has downloaded so far
|
|
||||||
bar.PrependFunc(func(b *uiprogress.Bar) string {
|
bar.PrependFunc(func(b *uiprogress.Bar) string {
|
||||||
return fmt.Sprintf("Downloading: %.2f GB / %.2f GB", bytesToGB(progressData.Completed), bytesToGB(progressData.Total))
|
return fmt.Sprintf("Downloading: %.2f GB / %.2f GB", bytesToGB(progressData.Completed), bytesToGB(progressData.Total))
|
||||||
})
|
})
|
||||||
|
|
||||||
// display completion percentage
|
|
||||||
bar.AppendFunc(func(b *uiprogress.Bar) string {
|
bar.AppendFunc(func(b *uiprogress.Bar) string {
|
||||||
return fmt.Sprintf(" %d%%", int((float64(progressData.Completed)/float64(progressData.Total))*100))
|
return fmt.Sprintf(" %d%%", int((float64(progressData.Completed)/float64(progressData.Total))*100))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue