Fix error messages (#27)

Use lowercase for kubernetes objects
Use %v instead of %s for errors
Start error messages with a lowercase letter.
This commit is contained in:
Oleksii Kliukin
2017-05-22 14:12:06 +02:00
committed by GitHub
parent 8beb5936b1
commit afce38f6f0
16 changed files with 187 additions and 196 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ type ConditionFunc func() (bool, error)
func Retry(interval time.Duration, timeout time.Duration, f ConditionFunc) error {
//TODO: make the retry exponential
if timeout < interval {
return fmt.Errorf("timout(%s) should be greater than interval(%s)", timeout, interval)
return fmt.Errorf("timout(%s) should be greater than interval(%v)", timeout, interval)
}
maxRetries := int(timeout / interval)
tick := time.NewTicker(interval)
@@ -29,5 +29,5 @@ func Retry(interval time.Duration, timeout time.Duration, f ConditionFunc) error
}
<-tick.C
}
return fmt.Errorf("Still failing after %d retries", maxRetries)
return fmt.Errorf("still failing after %d retries", maxRetries)
}