From 8c1f23d4a4dc16c87e0cf7d8b47c06be4a856a83 Mon Sep 17 00:00:00 2001 From: milarin Date: Sun, 15 Jan 2023 14:15:00 +0100 Subject: [PATCH] debug --- utils.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils.go b/utils.go index 1dffc26..4f54754 100644 --- a/utils.go +++ b/utils.go @@ -9,14 +9,14 @@ import ( func FormatBytes[T gmath.Integer](bytes T) string { value := float64(bytes) if value/1000000000000 >= 1000000000000 { - return fmt.Sprint("%.02fT", value/1000000000000) + return fmt.Sprintf("%.02fT", value/1000000000000) } else if value/1000000000 >= 1000000000 { - return fmt.Sprint("%.02fG", value/1000000000) + return fmt.Sprintf("%.02fG", value/1000000000) } else if value/1000000 >= 1000000 { - return fmt.Sprint("%.02fM", value/1000000) + return fmt.Sprintf("%.02fM", value/1000000) } else if value/1000 >= 1000 { - return fmt.Sprint("%.02fK", value/1000) + return fmt.Sprintf("%.02fK", value/1000) } else { - return fmt.Sprint("%.02fB", value) + return fmt.Sprintf("%.02fB", value) } }