(d time.Duration)
| 41 | ) |
| 42 | |
| 43 | func PrettifyDurationOutput(d time.Duration) string { |
| 44 | if d < time.Second { |
| 45 | return "0s" |
| 46 | } |
| 47 | result := fmt.Sprintf("%s", d) |
| 48 | result = prettifyDurationRegexp.ReplaceAllString(result, "") |
| 49 | return result |
| 50 | } |
| 51 | |
| 52 | // StringContainsAll returns true if `s` contains all non empty given `substrings` |
| 53 | // The function returns `false` if no non-empty arguments are given. |
no outgoing calls