Vendor dependencies with dep and commit vendor/

This commit is contained in:
Matthias Loibl 2018-04-28 16:12:36 +02:00
parent 2ef36da33a
commit 4c1f31f272
No known key found for this signature in database
GPG key ID: B1C7DF661ABB2C1A
38 changed files with 9490 additions and 0 deletions

26
vendor/github.com/alecthomas/units/si.go generated vendored Normal file
View file

@ -0,0 +1,26 @@
package units
// SI units.
type SI int64
// SI unit multiples.
const (
Kilo SI = 1000
Mega = Kilo * 1000
Giga = Mega * 1000
Tera = Giga * 1000
Peta = Tera * 1000
Exa = Peta * 1000
)
func MakeUnitMap(suffix, shortSuffix string, scale int64) map[string]float64 {
return map[string]float64{
shortSuffix: 1,
"K" + suffix: float64(scale),
"M" + suffix: float64(scale * scale),
"G" + suffix: float64(scale * scale * scale),
"T" + suffix: float64(scale * scale * scale * scale),
"P" + suffix: float64(scale * scale * scale * scale * scale),
"E" + suffix: float64(scale * scale * scale * scale * scale * scale),
}
}