BlueGit

timfa bluegit

Files

bluegit / internal / server / sidecount.go

sidecount.go

sidecount.go 293 B Download Raw
1package server
2
3import "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+.
7func 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}