Fix to avoid a compilation error of size_test.go with GCCGO due to float to int truncation

Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
This commit is contained in:
Tatsushi Inagaki
2014-11-25 18:12:22 +09:00
parent 36560a76d7
commit 82a5cd0d37
4 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ var binaryAbbrs = []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB",
// HumanSize returns a human-readable approximation of a size
// using SI standard (eg. "44kB", "17MB")
func HumanSize(size int64) string {
func HumanSize(size float64) string {
return intToString(float64(size), 1000.0, decimapAbbrs)
}