Commit 350aec77 authored by Bruce MacDonald's avatar Bruce MacDonald Committed by Jeffrey Morgan
Browse files

clean up unessesary comments

parent c9f45abe
...@@ -44,15 +44,11 @@ func run(model string) error { ...@@ -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))
}) })
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment