Separate cases is better when its more verbose

This commit is contained in:
Sam Boyer 2015-05-26 21:43:41 -04:00
parent bdc5983463
commit 930c6165d0
1 changed files with 7 additions and 1 deletions

View File

@ -638,7 +638,13 @@ func (c *Command) Run(args []string) int {
c.Ui.Output(update.Op)
c.Ui.Info(fmt.Sprintf("%.2f%%", update.Progress))
case update.Progress-lastProgress >= 5, time.Now().Sub(lastFlush) > time.Second, update.Progress == 100:
case update.Progress-lastProgress >= 5:
fallthrough
case time.Now().Sub(lastFlush) > time.Second:
fallthrough
case update.Progress == 100:
lastFlush = time.Now()
lastProgress = update.Progress
c.Ui.Info(fmt.Sprintf("%.2f%%", update.Progress))