Vishal Rana 7921d4bb75 Fixed enable/disable colored log %!s(int64=10) %!d(string=hai) anos
..
README.md a1a2f7c066 Color now has New function %!s(int64=10) %!d(string=hai) anos
gytes.go 7921d4bb75 Fixed enable/disable colored log %!s(int64=10) %!d(string=hai) anos
gytes_test.go 0ca40531ef Added API to enable/disable the package. %!s(int64=10) %!d(string=hai) anos

README.md

Gytes

Format bytes to string

Installation

go get github.com/labstack/gommon/gytes

Usage

import github.com/labstack/gommon/gytes

Decimal prefix

fmt.Println(gytes.Format(1323))

1.32 KB

Binary prefix

gytes.SetBinaryPrefix(true)
fmt.Println(gytes.Format(1323))

1.29 KiB

New instance

g := New()
fmt.Println(g.Format(13231323))