mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
vendorize: update all vendorized packages. (#2206)
Bring in new changes from upstream for all the packages. Important ones include - gorilla/mux - logrus - jwt
This commit is contained in:
33
vendor/github.com/dustin/go-humanize/README.markdown
generated
vendored
33
vendor/github.com/dustin/go-humanize/README.markdown
generated
vendored
@@ -1,4 +1,4 @@
|
||||
# Humane Units
|
||||
# Humane Units [](https://travis-ci.org/dustin/go-humanize) [](https://godoc.org/github.com/dustin/go-humanize)
|
||||
|
||||
Just a few functions for helping humanize times and sizes.
|
||||
|
||||
@@ -15,7 +15,9 @@ strings like, `83MB` or `79MiB` (whichever you prefer).
|
||||
|
||||
Example:
|
||||
|
||||
fmt.Printf("That file is %s.", humanize.Bytes(82854982))
|
||||
```go
|
||||
fmt.Printf("That file is %s.", humanize.Bytes(82854982))
|
||||
```
|
||||
|
||||
## Times
|
||||
|
||||
@@ -24,7 +26,9 @@ For example, `12 seconds ago` or `3 days from now`.
|
||||
|
||||
Example:
|
||||
|
||||
fmt.Printf("This was touched %s", humanize.Time(someTimeInstance))
|
||||
```go
|
||||
fmt.Printf("This was touched %s", humanize.Time(someTimeInstance))
|
||||
```
|
||||
|
||||
Thanks to Kyle Lemons for the time implementation from an IRC
|
||||
conversation one day. It's pretty neat.
|
||||
@@ -43,7 +47,9 @@ to label ordinals.
|
||||
|
||||
Example:
|
||||
|
||||
fmt.Printf("You're my %s best friend.", humanize.Ordinal(193))
|
||||
```go
|
||||
fmt.Printf("You're my %s best friend.", humanize.Ordinal(193))
|
||||
```
|
||||
|
||||
## Commas
|
||||
|
||||
@@ -57,16 +63,20 @@ Want to shove commas into numbers? Be my guest.
|
||||
|
||||
Example:
|
||||
|
||||
fmt.Printf("You owe $%s.\n", humanize.Comma(6582491))
|
||||
```go
|
||||
fmt.Printf("You owe $%s.\n", humanize.Comma(6582491))
|
||||
```
|
||||
|
||||
## Ftoa
|
||||
|
||||
Nicer float64 formatter that removes trailing zeros.
|
||||
|
||||
fmt.Printf("%f", 2.24) // 2.240000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
|
||||
fmt.Printf("%f", 2.0) // 2.000000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
|
||||
```go
|
||||
fmt.Printf("%f", 2.24) // 2.240000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
|
||||
fmt.Printf("%f", 2.0) // 2.000000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
|
||||
```
|
||||
|
||||
## SI notation
|
||||
|
||||
@@ -74,8 +84,9 @@ Format numbers with [SI notation][sinotation].
|
||||
|
||||
Example:
|
||||
|
||||
humanize.SI(0.00000000223, "M") // 2.23nM
|
||||
|
||||
```go
|
||||
humanize.SI(0.00000000223, "M") // 2.23nM
|
||||
```
|
||||
|
||||
[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
|
||||
[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix
|
||||
|
||||
Reference in New Issue
Block a user