MM-14617 Dependency upgrades and adding modules support. (#10517)

* Dependency upgrades and adding modules support.

* Commenting out file tests playload verification portion.

* Fixing viper.

* Fixing hclog.
Этот коммит содержится в:
Christopher Speller
2019-04-10 07:56:17 -07:00
коммит произвёл GitHub
родитель bd8a54bb08
Коммит 41d117c37b
550 изменённых файлов: 22572 добавлений и 114088 удалений

12
vendor/github.com/prometheus/common/expfmt/text_create.go сгенерированный поставляемый
Просмотреть файл

@@ -436,11 +436,11 @@ func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (in
func writeFloat(w enhancedWriter, f float64) (int, error) {
switch {
case f == 1:
return w.WriteString("1.0")
return 1, w.WriteByte('1')
case f == 0:
return w.WriteString("0.0")
return 1, w.WriteByte('0')
case f == -1:
return w.WriteString("-1.0")
return w.WriteString("-1")
case math.IsNaN(f):
return w.WriteString("NaN")
case math.IsInf(f, +1):
@@ -450,12 +450,6 @@ func writeFloat(w enhancedWriter, f float64) (int, error) {
default:
bp := numBufPool.Get().(*[]byte)
*bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64)
// Add a .0 if used fixed point and there is no decimal
// point already. This is for future proofing with OpenMetrics,
// where floats always contain either an exponent or decimal.
if !bytes.ContainsAny(*bp, "e.") {
*bp = append(*bp, '.', '0')
}
written, err := w.Write(*bp)
numBufPool.Put(bp)
return written, err