diff options
Diffstat (limited to 'vendor/github.com/labstack/gommon/bytes')
-rw-r--r-- | vendor/github.com/labstack/gommon/bytes/LICENSE | 22 | ||||
-rw-r--r-- | vendor/github.com/labstack/gommon/bytes/README.md | 29 |
2 files changed, 29 insertions, 22 deletions
diff --git a/vendor/github.com/labstack/gommon/bytes/LICENSE b/vendor/github.com/labstack/gommon/bytes/LICENSE deleted file mode 100644 index d2ae3edf..00000000 --- a/vendor/github.com/labstack/gommon/bytes/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 labstack - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/github.com/labstack/gommon/bytes/README.md b/vendor/github.com/labstack/gommon/bytes/README.md new file mode 100644 index 00000000..6e3b0fd3 --- /dev/null +++ b/vendor/github.com/labstack/gommon/bytes/README.md @@ -0,0 +1,29 @@ +# Bytes + +- Format bytes integer to human readable bytes string. +- Parse human readable bytes string to bytes integer. + +## Installation + +```go +go get github.com/labstack/gommon/bytes +``` + +## [Usage](https://github.com/labstack/gommon/blob/master/bytes/bytes_test.go) + +### Format + +```go +println(bytes.Format(13231323)) +``` + +`12.62MB` + +### Parse + +```go +b, _ = Parse("2M") +println(b) +``` + +`2097152` |