Atlantiraptor Docs

humanize

Type: Function · Category: popular

Format items in human readable way.

Formats a byte count in human readable way (e.g. Mb, Gb etc).

Argument Type Description
bytes int64 Format bytes with units (e.g. MB)
ibytes int64 Format bytes with units (e.g. MiB)
time time.Time Format time (e.g. 2 hours ago)
comma int64 Format integer with comma (e.g. 1,230)

Platforms: macOS, Linux, Windows