mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-17 23:25:32 +02:00
Revert "Update go-containerregistry to get https://github.com/google/go-containerregistry/pull/693"
This reverts commit f55c34ab92.
This commit is contained in:
+1
@@ -21,6 +21,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
separator = []byte{0}
|
||||
// MetricNameRE is a regular expression matching valid metric
|
||||
// names. Note that the IsValidMetricName function performs the same
|
||||
// check but faster than a match with this regular expression.
|
||||
|
||||
+2
-8
@@ -43,7 +43,7 @@ const (
|
||||
// (1970-01-01 00:00 UTC) excluding leap seconds.
|
||||
type Time int64
|
||||
|
||||
// Interval describes an interval between two timestamps.
|
||||
// Interval describes and interval between two timestamps.
|
||||
type Interval struct {
|
||||
Start, End Time
|
||||
}
|
||||
@@ -150,13 +150,7 @@ func (t *Time) UnmarshalJSON(b []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
*t = Time(v + va)
|
||||
|
||||
default:
|
||||
return fmt.Errorf("invalid time %q", string(b))
|
||||
|
||||
Reference in New Issue
Block a user