Format bytes to string
go get github.com/labstack/gommon/gytes
import github.com/labstack/gommon/gytes
fmt.Println(gytes.Format(1323))
1.32 KB
gytes.SetBinaryPrefix(true)
fmt.Println(gytes.Format(1323))
1.29 KiB
g := New()
fmt.Println(g.Format(13231323))