From 772f99fd746d8b1c65f3f456330f83cdafc36aea Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 3 Jun 2016 22:49:14 +0100 Subject: [PATCH] Make SizeSuffix output without `b` suffix for more useful printouts --- fs/config.go | 2 +- fs/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/config.go b/fs/config.go index 258b57931..b9a960c50 100644 --- a/fs/config.go +++ b/fs/config.go @@ -108,7 +108,7 @@ func (x SizeSuffix) String() string { return "0" case x < 1024: scaled = float64(x) - suffix = "b" + suffix = "" case x < 1024*1024: scaled = float64(x) / 1024 suffix = "k" diff --git a/fs/config_test.go b/fs/config_test.go index a1da2b17d..c676399f3 100644 --- a/fs/config_test.go +++ b/fs/config_test.go @@ -12,7 +12,7 @@ func TestSizeSuffixString(t *testing.T) { want string }{ {0, "0"}, - {102, "102b"}, + {102, "102"}, {1024, "1k"}, {1024 * 1024, "1M"}, {1024 * 1024 * 1024, "1G"},