Merge pull request #9233 from inatatsu/fix-pkg-units-size-for-gccgo

Fix to avoid a compile error due to float to int truncation with GCCGO
This commit is contained in:
Michael Crosby 2014-12-18 18:33:01 -08:00
commit f4ca80df36

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 // HumanSize returns a human-readable approximation of a size
// using SI standard (eg. "44kB", "17MB") // using SI standard (eg. "44kB", "17MB")
func HumanSize(size int64) string { func HumanSize(size float64) string {
return intToString(float64(size), 1000.0, decimapAbbrs) return intToString(float64(size), 1000.0, decimapAbbrs)
} }