add wget style format and also use Set() current position instead of 'Add()'

This commit is contained in:
Harshavardhana
2015-03-10 21:58:51 -07:00
parent 3dd09a735a
commit dda9d128d5
+3 -1
View File
@@ -40,6 +40,8 @@ func startBar(size int64) *pb.ProgressBar {
// Colorize
infoCallback(s)
}
// Feels like wget
bar.Format("[=> ]")
return bar
}
@@ -144,7 +146,7 @@ func doFsCopy(c *cli.Context) {
if err != nil {
fatal(err.Error())
}
bar.Add(int(downloadedSize))
bar.Set(int(downloadedSize))
}
// Start the bar now
bar.Start()