From 05dc9e190a8576daabece6203f0ffbcd78ae03d1 Mon Sep 17 00:00:00 2001 From: nite07 Date: Fri, 22 Nov 2024 02:10:03 +0800 Subject: [PATCH] modify BytesToSize --- utils/size.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/size.go b/utils/size.go index 623db98..7e5dfbb 100644 --- a/utils/size.go +++ b/utils/size.go @@ -54,7 +54,7 @@ func BytesToSize(size uint64) string { _ = iota KB uint64 = 1 << (10 * iota) MB - GB + GBc TB ) switch { @@ -65,6 +65,6 @@ func BytesToSize(size uint64) string { case size >= KB: return fmt.Sprintf("%.1f KB", float64(size)/float64(KB)) default: - return fmt.Sprintf("%d Bytes", size) + return fmt.Sprintf("%d B", size) } }