Human readable byte formatter
Branch: master
Clone or download
im-kulikov and jvshahid Performance optimizations (without regexp / fmt)
adds benchmarks

closes #19

[#160270164]
Latest commit 2aa6f33 Sep 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Update LICENSE Feb 23, 2017
NOTICE Update NOTICE Feb 3, 2017
README.md README: update godoc URL Sep 18, 2016
benchmarks_test.go
bytes.go Performance optimizations (without regexp / fmt) Sep 6, 2018
bytes_test.go Performance optimizations (without regexp / fmt) Sep 6, 2018
formatters_suite_test.go extracted from cloudfoundry/cli, added comments Apr 1, 2014
package.go Enforce canonical import path Feb 6, 2017

README.md

bytefmt

Note: This repository should be imported as code.cloudfoundry.org/bytefmt.

Human-readable byte formatter.

Example:

bytefmt.ByteSize(100.5*bytefmt.MEGABYTE) // returns "100.5M"
bytefmt.ByteSize(uint64(1024)) // returns "1K"

For documentation, please see http://godoc.org/code.cloudfoundry.org/bytefmt