debian-forge-composer/vendor/github.com/labstack/gommon/bytes
dependabot[bot] b7418d6bba build(deps): bump github.com/labstack/gommon from 0.3.1 to 0.4.0
Bumps [github.com/labstack/gommon](https://github.com/labstack/gommon) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/labstack/gommon/releases)
- [Commits](https://github.com/labstack/gommon/compare/v0.3.1...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/labstack/gommon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 13:00:08 +02:00
..
bytes.go build(deps): bump github.com/labstack/gommon from 0.3.1 to 0.4.0 2022-10-05 13:00:08 +02:00
README.md cloudapi: use Recover middleware to handle panics 2021-09-24 12:11:04 +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