mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-14 17:44:42 +00:00
Update go-humanize dependency to v1.0.1
This commit is contained in:
parent
102e129280
commit
c6e6a2ac17
11 changed files with 43 additions and 18 deletions
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/clbanning/mxj v1.8.4
|
github.com/clbanning/mxj v1.8.4
|
||||||
github.com/dustin/go-humanize v1.0.0
|
github.com/dustin/go-humanize v1.0.1
|
||||||
github.com/fsnotify/fsnotify v1.4.7 // indirect
|
github.com/fsnotify/fsnotify v1.4.7 // indirect
|
||||||
github.com/ghodss/yaml v1.0.0
|
github.com/ghodss/yaml v1.0.0
|
||||||
github.com/go-chi/chi/v5 v5.0.12
|
github.com/go-chi/chi/v5 v5.0.12
|
||||||
|
|
6
go.sum
6
go.sum
|
@ -1,7 +1,7 @@
|
||||||
github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
|
github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
|
||||||
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
|
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
|
||||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||||
|
@ -10,8 +10,6 @@ github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
|
||||||
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||||
github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
|
github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
|
||||||
github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
|
||||||
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
|
|
||||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
|
||||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||||
|
|
16
vendor/github.com/dustin/go-humanize/.travis.yml
generated
vendored
16
vendor/github.com/dustin/go-humanize/.travis.yml
generated
vendored
|
@ -1,12 +1,12 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
language: go
|
language: go
|
||||||
|
go_import_path: github.com/dustin/go-humanize
|
||||||
go:
|
go:
|
||||||
- 1.3.x
|
- 1.13.x
|
||||||
- 1.5.x
|
- 1.14.x
|
||||||
- 1.6.x
|
- 1.15.x
|
||||||
- 1.7.x
|
- 1.16.x
|
||||||
- 1.8.x
|
- stable
|
||||||
- 1.9.x
|
|
||||||
- master
|
- master
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
@ -15,7 +15,7 @@ matrix:
|
||||||
install:
|
install:
|
||||||
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
|
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
|
||||||
script:
|
script:
|
||||||
- go get -t -v ./...
|
|
||||||
- diff -u <(echo -n) <(gofmt -d -s .)
|
- diff -u <(echo -n) <(gofmt -d -s .)
|
||||||
- go tool vet .
|
- go vet .
|
||||||
|
- go install -v -race ./...
|
||||||
- go test -v -race ./...
|
- go test -v -race ./...
|
||||||
|
|
2
vendor/github.com/dustin/go-humanize/README.markdown
generated
vendored
2
vendor/github.com/dustin/go-humanize/README.markdown
generated
vendored
|
@ -5,7 +5,7 @@ Just a few functions for helping humanize times and sizes.
|
||||||
`go get` it as `github.com/dustin/go-humanize`, import it as
|
`go get` it as `github.com/dustin/go-humanize`, import it as
|
||||||
`"github.com/dustin/go-humanize"`, use it as `humanize`.
|
`"github.com/dustin/go-humanize"`, use it as `humanize`.
|
||||||
|
|
||||||
See [godoc](https://godoc.org/github.com/dustin/go-humanize) for
|
See [godoc](https://pkg.go.dev/github.com/dustin/go-humanize) for
|
||||||
complete documentation.
|
complete documentation.
|
||||||
|
|
||||||
## Sizes
|
## Sizes
|
||||||
|
|
20
vendor/github.com/dustin/go-humanize/bigbytes.go
generated
vendored
20
vendor/github.com/dustin/go-humanize/bigbytes.go
generated
vendored
|
@ -28,6 +28,10 @@ var (
|
||||||
BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp)
|
BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp)
|
||||||
// BigYiByte is 1,024 z bytes in bit.Ints
|
// BigYiByte is 1,024 z bytes in bit.Ints
|
||||||
BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp)
|
BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp)
|
||||||
|
// BigRiByte is 1,024 y bytes in bit.Ints
|
||||||
|
BigRiByte = (&big.Int{}).Mul(BigYiByte, bigIECExp)
|
||||||
|
// BigQiByte is 1,024 r bytes in bit.Ints
|
||||||
|
BigQiByte = (&big.Int{}).Mul(BigRiByte, bigIECExp)
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -51,6 +55,10 @@ var (
|
||||||
BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp)
|
BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp)
|
||||||
// BigYByte is 1,000 SI z bytes in big.Ints
|
// BigYByte is 1,000 SI z bytes in big.Ints
|
||||||
BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp)
|
BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp)
|
||||||
|
// BigRByte is 1,000 SI y bytes in big.Ints
|
||||||
|
BigRByte = (&big.Int{}).Mul(BigYByte, bigSIExp)
|
||||||
|
// BigQByte is 1,000 SI r bytes in big.Ints
|
||||||
|
BigQByte = (&big.Int{}).Mul(BigRByte, bigSIExp)
|
||||||
)
|
)
|
||||||
|
|
||||||
var bigBytesSizeTable = map[string]*big.Int{
|
var bigBytesSizeTable = map[string]*big.Int{
|
||||||
|
@ -71,6 +79,10 @@ var bigBytesSizeTable = map[string]*big.Int{
|
||||||
"zb": BigZByte,
|
"zb": BigZByte,
|
||||||
"yib": BigYiByte,
|
"yib": BigYiByte,
|
||||||
"yb": BigYByte,
|
"yb": BigYByte,
|
||||||
|
"rib": BigRiByte,
|
||||||
|
"rb": BigRByte,
|
||||||
|
"qib": BigQiByte,
|
||||||
|
"qb": BigQByte,
|
||||||
// Without suffix
|
// Without suffix
|
||||||
"": BigByte,
|
"": BigByte,
|
||||||
"ki": BigKiByte,
|
"ki": BigKiByte,
|
||||||
|
@ -89,6 +101,10 @@ var bigBytesSizeTable = map[string]*big.Int{
|
||||||
"zi": BigZiByte,
|
"zi": BigZiByte,
|
||||||
"y": BigYByte,
|
"y": BigYByte,
|
||||||
"yi": BigYiByte,
|
"yi": BigYiByte,
|
||||||
|
"r": BigRByte,
|
||||||
|
"ri": BigRiByte,
|
||||||
|
"q": BigQByte,
|
||||||
|
"qi": BigQiByte,
|
||||||
}
|
}
|
||||||
|
|
||||||
var ten = big.NewInt(10)
|
var ten = big.NewInt(10)
|
||||||
|
@ -115,7 +131,7 @@ func humanateBigBytes(s, base *big.Int, sizes []string) string {
|
||||||
//
|
//
|
||||||
// BigBytes(82854982) -> 83 MB
|
// BigBytes(82854982) -> 83 MB
|
||||||
func BigBytes(s *big.Int) string {
|
func BigBytes(s *big.Int) string {
|
||||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
|
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "RB", "QB"}
|
||||||
return humanateBigBytes(s, bigSIExp, sizes)
|
return humanateBigBytes(s, bigSIExp, sizes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +141,7 @@ func BigBytes(s *big.Int) string {
|
||||||
//
|
//
|
||||||
// BigIBytes(82854982) -> 79 MiB
|
// BigIBytes(82854982) -> 79 MiB
|
||||||
func BigIBytes(s *big.Int) string {
|
func BigIBytes(s *big.Int) string {
|
||||||
sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}
|
sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", "RiB", "QiB"}
|
||||||
return humanateBigBytes(s, bigIECExp, sizes)
|
return humanateBigBytes(s, bigIECExp, sizes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
vendor/github.com/dustin/go-humanize/commaf.go
generated
vendored
1
vendor/github.com/dustin/go-humanize/commaf.go
generated
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build go1.6
|
||||||
// +build go1.6
|
// +build go1.6
|
||||||
|
|
||||||
package humanize
|
package humanize
|
||||||
|
|
3
vendor/github.com/dustin/go-humanize/ftoa.go
generated
vendored
3
vendor/github.com/dustin/go-humanize/ftoa.go
generated
vendored
|
@ -6,6 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func stripTrailingZeros(s string) string {
|
func stripTrailingZeros(s string) string {
|
||||||
|
if !strings.ContainsRune(s, '.') {
|
||||||
|
return s
|
||||||
|
}
|
||||||
offset := len(s) - 1
|
offset := len(s) - 1
|
||||||
for offset > 0 {
|
for offset > 0 {
|
||||||
if s[offset] == '.' {
|
if s[offset] == '.' {
|
||||||
|
|
3
vendor/github.com/dustin/go-humanize/go.mod
generated
vendored
Normal file
3
vendor/github.com/dustin/go-humanize/go.mod
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module github.com/dustin/go-humanize
|
||||||
|
|
||||||
|
go 1.16
|
2
vendor/github.com/dustin/go-humanize/number.go
generated
vendored
2
vendor/github.com/dustin/go-humanize/number.go
generated
vendored
|
@ -73,7 +73,7 @@ func FormatFloat(format string, n float64) string {
|
||||||
if n > math.MaxFloat64 {
|
if n > math.MaxFloat64 {
|
||||||
return "Infinity"
|
return "Infinity"
|
||||||
}
|
}
|
||||||
if n < -math.MaxFloat64 {
|
if n < (0.0 - math.MaxFloat64) {
|
||||||
return "-Infinity"
|
return "-Infinity"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
vendor/github.com/dustin/go-humanize/si.go
generated
vendored
4
vendor/github.com/dustin/go-humanize/si.go
generated
vendored
|
@ -8,6 +8,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var siPrefixTable = map[float64]string{
|
var siPrefixTable = map[float64]string{
|
||||||
|
-30: "q", // quecto
|
||||||
|
-27: "r", // ronto
|
||||||
-24: "y", // yocto
|
-24: "y", // yocto
|
||||||
-21: "z", // zepto
|
-21: "z", // zepto
|
||||||
-18: "a", // atto
|
-18: "a", // atto
|
||||||
|
@ -25,6 +27,8 @@ var siPrefixTable = map[float64]string{
|
||||||
18: "E", // exa
|
18: "E", // exa
|
||||||
21: "Z", // zetta
|
21: "Z", // zetta
|
||||||
24: "Y", // yotta
|
24: "Y", // yotta
|
||||||
|
27: "R", // ronna
|
||||||
|
30: "Q", // quetta
|
||||||
}
|
}
|
||||||
|
|
||||||
var revSIPrefixTable = revfmap(siPrefixTable)
|
var revSIPrefixTable = revfmap(siPrefixTable)
|
||||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -1,7 +1,7 @@
|
||||||
# github.com/clbanning/mxj v1.8.4
|
# github.com/clbanning/mxj v1.8.4
|
||||||
## explicit
|
## explicit
|
||||||
github.com/clbanning/mxj
|
github.com/clbanning/mxj
|
||||||
# github.com/dustin/go-humanize v1.0.0
|
# github.com/dustin/go-humanize v1.0.1
|
||||||
## explicit
|
## explicit
|
||||||
github.com/dustin/go-humanize
|
github.com/dustin/go-humanize
|
||||||
# github.com/fsnotify/fsnotify v1.4.7
|
# github.com/fsnotify/fsnotify v1.4.7
|
||||||
|
|
Loading…
Add table
Reference in a new issue