package server

import "strconv"

// formatSideCount is the short label in the project sidebar badge.
// Zero is hidden by the template. Counts above 99 are shown as 99+.
func formatSideCount(n int) string {
	if n > 99 {
		return "99+"
	}
	if n < 0 {
		return "0"
	}
	return strconv.Itoa(n)
}
