From 6d8542a6534310ccbdc65b2747f9da2fbb917be8 Mon Sep 17 00:00:00 2001 From: sonnemusk Date: Thu, 23 Jul 2026 07:48:32 +0800 Subject: [PATCH] docs(bytes): FormatBinary example uses KiB not KB FormatBinary returns IEC binary units (KiB/MiB/...). The godoc example incorrectly said 30.59KB; tests already expect 30.59KiB. --- bytes/bytes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bytes/bytes.go b/bytes/bytes.go index b07e31c..5f795e3 100644 --- a/bytes/bytes.go +++ b/bytes/bytes.go @@ -45,13 +45,13 @@ func New() *Bytes { } // Format formats bytes integer to human readable string according to IEC 60027. -// For example, 31323 bytes will return 30.59KB. +// For example, 31323 bytes will return 30.59KiB. func (b *Bytes) Format(value int64) string { return b.FormatBinary(value) } // FormatBinary formats bytes integer to human readable string according to IEC 60027. -// For example, 31323 bytes will return 30.59KB. +// For example, 31323 bytes will return 30.59KiB. func (*Bytes) FormatBinary(value int64) string { multiple := "" val := float64(value)