dustin/go-humanize

Support for Bits

Opened this issue · 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.

Have you tried humanize.SI()?

The example below will return 1 Gb/s:

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