https://github.com/pyk/byten
Bit the size of file and turn it into human readable format. Go Package.
https://github.com/pyk/byten
Last synced: over 1 year ago
JSON representation
Bit the size of file and turn it into human readable format. Go Package.
- Host: GitHub
- URL: https://github.com/pyk/byten
- Owner: pyk
- License: mit
- Created: 2014-08-29T18:31:06.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-25T23:34:02.000Z (over 11 years ago)
- Last Synced: 2025-02-27T13:21:16.249Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 203 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
byten
=====
Bit the size of file and turn it into human readable format.
This is a Go Package that convert size of file into human readable format.
Another weekend project by [pyk](http://google.com/+bayualdiyansyah).
### Usage
First thing first, get the remote package
```
$ go get github.com/pyk/byten
```
and import package into your project
```
import "github.com/pyk/byten"
```
then bite the bytes!
```
byten.Size(1024) # => 1.0KB
byten.Size(206848) # => 202KB
byten.Size(10239999998976) # => 9.3TB
byten.Size(6314666666666665984) # => 5.5EB
```
easy huh? =))
### Docs
Nothing fancy, but you can see [here](https://godoc.org/github.com/pyk/byten)
### License
[MIT License](https://github.com/pyk/byten/blob/master/LICENSE)