| 1 | package server |
| 2 | |
| 3 | import "strconv" |
| 4 | |
| 5 | // formatSideCount is the short label in the project sidebar badge. |
| 6 | // Zero is hidden by the template. Counts above 99 are shown as 99+. |
| 7 | func formatSideCount(n int) string { |
| 8 | if n > 99 { |
| 9 | return "99+" |
| 10 | } |
| 11 | if n < 0 { |
| 12 | return "0" |
| 13 | } |
| 14 | return strconv.Itoa(n) |
| 15 | } |