aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/util_format.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/util_format.go')
-rw-r--r--modules/templates/util_format.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/templates/util_format.go b/modules/templates/util_format.go
index bee6fb7b75..3485e3251e 100644
--- a/modules/templates/util_format.go
+++ b/modules/templates/util_format.go
@@ -5,6 +5,7 @@ package templates
import (
"fmt"
+ "strconv"
"code.gitea.io/gitea/modules/util"
)
@@ -24,7 +25,7 @@ func countFmt(data any) string {
return ""
}
if num < 1000 {
- return fmt.Sprintf("%d", num)
+ return strconv.FormatInt(num, 10)
} else if num < 1_000_000 {
num2 := float32(num) / 1000.0
return fmt.Sprintf("%.1fk", num2)