Merge pull request #1515 from lilijreey/use_time_IsZero
improved code more clean use time.IsZero() replace t = time.Time{}
This commit is contained in:
commit
cb57abb57d
|
@ -234,7 +234,7 @@ func NewMetricWithExemplars(m Metric, exemplars ...Exemplar) (Metric, error) {
|
|||
)
|
||||
for i, e := range exemplars {
|
||||
ts := e.Timestamp
|
||||
if ts == (time.Time{}) {
|
||||
if ts.IsZero() {
|
||||
ts = now
|
||||
}
|
||||
exs[i], err = newExemplar(e.Value, ts, e.Labels)
|
||||
|
|
Loading…
Reference in New Issue