Vishal Rana 60ec6a7736 Update README.md il y a 10 ans
..
README.md 60ec6a7736 Update README.md il y a 10 ans
bytes.go 1109e5b250 Changed binary prefix function il y a 10 ans
bytes_test.go 1109e5b250 Changed binary prefix function il y a 10 ans

README.md

Bytes

Format bytes to string

Installation

go get github.com/labstack/gommon/bytes

Usage

import gytes github.com/labstack/gommon/bytes

Decimal prefix

fmt.Println(gytes.Format(1323))

1.32 KB

Binary prefix

fmt.Println(gytes.FormatB(1323))

1.29 KiB