mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
if statement must be true
This commit is contained in:
@@ -122,10 +122,7 @@ func (h *HeapsterMetricsClient) GetResourceMetric(resource v1.ResourceName, name
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
timestamp := time.Time{}
|
timestamp := metrics.Items[0].Timestamp.Time
|
||||||
if len(metrics.Items) > 0 {
|
|
||||||
timestamp = metrics.Items[0].Timestamp.Time
|
|
||||||
}
|
|
||||||
|
|
||||||
return res, timestamp, nil
|
return res, timestamp, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user