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 17:02:47 +09:00
parent 7d92b1230e
commit e5b1c19379

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)
}