BytesStringBase10 formats the given value as bytes with the appropriate base-10 suffix (KB, MB, GB, ...)
(b T)
| 46 | |
| 47 | // BytesStringBase10 formats the given value as bytes with the appropriate base-10 suffix (KB, MB, GB, ...) |
| 48 | func BytesStringBase10[T realNumber](b T) string { |
| 49 | //nolint:mnd |
| 50 | return toDecimalUnitString(b, 1000, base10UnitPrefixes, "B") |
| 51 | } |
| 52 | |
| 53 | // BytesStringBase2 formats the given value as bytes with the appropriate base-2 suffix (KiB, MiB, GiB, ...) |
| 54 | func BytesStringBase2[T realNumber](b T) string { |