|
|
@@ -6,14 +6,15 @@ import (
|
|
|
"math"
|
|
|
)
|
|
|
|
|
|
-// Format formats bytes to string. For example, 1000 would returns 1 KB
|
|
|
+// Format formats bytes to string with decimal prefix. For example, 1000 would returns
|
|
|
+// 1 KB
|
|
|
func Format(b uint64) string {
|
|
|
return format(float64(b), false)
|
|
|
}
|
|
|
|
|
|
-// FormatBin formats bytes to string as specified by ICE standard. For example,
|
|
|
-// 1024 would return 1 KiB.
|
|
|
-func FormatBin(b uint64) string {
|
|
|
+// FormatB formats bytes to string with binary prefix. For example, 1024 would
|
|
|
+// return 1 KiB.
|
|
|
+func FormatB(b uint64) string {
|
|
|
return format(float64(b), true)
|
|
|
}
|
|
|
|