(count float64)
| 21 | } |
| 22 | |
| 23 | func FormatCountFloat64(count float64) string { |
| 24 | switch { |
| 25 | case count < 1000: |
| 26 | return fmt.Sprintf("%.1f", count) |
| 27 | case count < 1000000: |
| 28 | return fmt.Sprintf("%.1fK", count/1000) |
| 29 | case count < 1000000000: |
| 30 | return fmt.Sprintf("%.1fM", count/1000000) |
| 31 | case count < 1000000000000: |
| 32 | return fmt.Sprintf("%.1fB", count/1000000000) |
| 33 | default: |
| 34 | return fmt.Sprintf("%.1fT", count/1000000000000) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func FormatTime(t int64) string { |
| 39 | if t < 1000 { |
nothing calls this directly
no outgoing calls
no test coverage detected