mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 04:56:38 +00:00
Update/delete vendor files
Refreshed / updated vendor dependencies Tested with "make". Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
f62bcb0736
commit
d6cf72bb39
10
gateway/vendor/github.com/prometheus/common/model/time.go
generated
vendored
10
gateway/vendor/github.com/prometheus/common/model/time.go
generated
vendored
@ -43,7 +43,7 @@ const (
|
||||
// (1970-01-01 00:00 UTC) excluding leap seconds.
|
||||
type Time int64
|
||||
|
||||
// Interval describes and interval between two timestamps.
|
||||
// Interval describes an interval between two timestamps.
|
||||
type Interval struct {
|
||||
Start, End Time
|
||||
}
|
||||
@ -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))
|
||||
|
Reference in New Issue
Block a user