https://github.com/twiny/bprint
convert byte size into a human-readable format in Go
https://github.com/twiny/bprint
byteconvert go go-utils
Last synced: about 1 year ago
JSON representation
convert byte size into a human-readable format in Go
- Host: GitHub
- URL: https://github.com/twiny/bprint
- Owner: twiny
- License: mit
- Created: 2021-08-22T14:00:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-25T12:54:22.000Z (almost 5 years ago)
- Last Synced: 2025-02-09T17:42:45.745Z (over 1 year ago)
- Topics: byteconvert, go, go-utils
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Byte Print
convert byte size into human readable format in Go.
## Download
`go get github.com/twiny/bprint`
## Example
```go
package main
import (
"fmt"
"runtime"
"github.com/twiny/bprint"
)
func main() {
stats := new(runtime.MemStats)
runtime.ReadMemStats(stats)
//
fmt.Println(bprint.String(stats.Sys))
}
// output
// 68.08M
```