Update prometheus/client_golang to v1.0.0 (#1382)
Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
parent
22a7dbae08
commit
a9231ad6ad
23 changed files with 896 additions and 1068 deletions
8
vendor/github.com/prometheus/common/model/time.go
generated
vendored
8
vendor/github.com/prometheus/common/model/time.go
generated
vendored
|
|
@ -150,7 +150,13 @@ func (t *Time) UnmarshalJSON(b []byte) error {
|
|||
return err
|
||||
}
|
||||
|
||||
*t = Time(v + va)
|
||||
// If the value was something like -0.1 the negative is lost in the
|
||||
// parsing because of the leading zero, this ensures that we capture it.
|
||||
if len(p[0]) > 0 && p[0][0] == '-' && v+va > 0 {
|
||||
*t = Time(v+va) * -1
|
||||
} else {
|
||||
*t = Time(v + va)
|
||||
}
|
||||
|
||||
default:
|
||||
return fmt.Errorf("invalid time %q", string(b))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue