Vishal Rana 60ec6a7736 Update README.md 10 years ago
..
README.md 60ec6a7736 Update README.md 10 years ago
bytes.go 1109e5b250 Changed binary prefix function 10 years ago
bytes_test.go 1109e5b250 Changed binary prefix function 10 years ago

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