mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
Make SizeSuffix output without b
suffix for more useful printouts
This commit is contained in:
parent
9bbcdeefd0
commit
772f99fd74
@ -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"
|
||||
|
@ -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"},
|
||||
|
Loading…
Reference in New Issue
Block a user