dip/vendor/github.com/labstack/gommon/bytes
Paul Lecuq 6e76a6dbd9
All checks were successful
continuous-integration/drone/push Build is passing
updated dependencies
2022-11-02 17:50:56 +01:00
..
bytes.go updated dependencies 2022-11-02 17:50:56 +01:00
README.md updated dip vendors 2020-02-11 19:33:19 +01:00

Bytes

  • Format bytes integer to human readable bytes string.
  • Parse human readable bytes string to bytes integer.

Installation

go get github.com/labstack/gommon/bytes

Usage

Format

println(bytes.Format(13231323))

12.62MB

Parse

b, _ = Parse("2M")
println(b)

2097152