From 0c05ffeef6cbd8c79cc45ee759377fa6c059e2d4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 8 Feb 2022 01:52:27 +0400 Subject: [PATCH] Add a space between size and unit. --- pkg/utils/filesize.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/utils/filesize.go b/pkg/utils/filesize.go index dc86630..11e4734 100644 --- a/pkg/utils/filesize.go +++ b/pkg/utils/filesize.go @@ -1,7 +1,6 @@ package utils import ( - "fmt" "io/fs" "path/filepath" "strconv" @@ -26,7 +25,7 @@ func ConvertFileSize(size int64) (float64, string, string) { fSizeStr = strings.TrimRight(fSizeStr, "0") fSizeStr = strings.TrimSuffix(fSizeStr, ".") - return fSize, sizeSuffixes[idx], fmt.Sprint(fSizeStr, sizeSuffixes[idx]) + return fSize, sizeSuffixes[idx], strings.Join([]string{fSizeStr, sizeSuffixes[idx]}, " ") } func DirectorySize(path string) (dirSz int64, err error) {