go-humanize icon indicating copy to clipboard operation
go-humanize copied to clipboard

Support for Bits

Open keyneston opened this issue 10 years ago • 1 comments

Hey, humanize supports Bytes, but it would be quite nice if it also supported Bits.

The major difference is just in the capitalization. Specifically instead of 8MB it would be 8Mb.

keyneston avatar Nov 05 '15 01:11 keyneston

Have you tried humanize.SI()?

The example below will return 1 Gb/s:

humanize.SI(1_000_000_000, "b/s")

edigaryev avatar May 02 '24 12:05 edigaryev