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:
Harshavardhana
2016-07-14 14:59:20 -07:00
committed by GitHub
parent b090c7112e
commit 35d438e0ff
84 changed files with 2546 additions and 1506 deletions

View File

@@ -1,4 +1,4 @@
# Humane Units
# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](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