An open API service indexing awesome lists of open source software.

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

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
```