mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -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:
6
vendor/github.com/dustin/go-humanize/bytes.go
generated
vendored
6
vendor/github.com/dustin/go-humanize/bytes.go
generated
vendored
@@ -67,14 +67,14 @@ func logn(n, b float64) float64 {
|
||||
|
||||
func humanateBytes(s uint64, base float64, sizes []string) string {
|
||||
if s < 10 {
|
||||
return fmt.Sprintf("%dB", s)
|
||||
return fmt.Sprintf("%d B", s)
|
||||
}
|
||||
e := math.Floor(logn(float64(s), base))
|
||||
suffix := sizes[int(e)]
|
||||
val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10
|
||||
f := "%.0f%s"
|
||||
f := "%.0f %s"
|
||||
if val < 10 {
|
||||
f = "%.1f%s"
|
||||
f = "%.1f %s"
|
||||
}
|
||||
|
||||
return fmt.Sprintf(f, val, suffix)
|
||||
|
||||
Reference in New Issue
Block a user