mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Make the linter happy
This commit is contained in:
parent
4bf8ec202c
commit
6c45249fb5
|
@ -594,7 +594,17 @@ func (c *chainSampleIterator) Next() chunkenc.ValueType {
|
||||||
|
|
||||||
for {
|
for {
|
||||||
currValueType = c.curr.Next()
|
currValueType = c.curr.Next()
|
||||||
if currValueType != chunkenc.ValNone {
|
|
||||||
|
if currValueType == chunkenc.ValNone {
|
||||||
|
if c.curr.Err() != nil {
|
||||||
|
// Abort if we've hit an error.
|
||||||
|
return chunkenc.ValNone
|
||||||
|
} else if len(c.h) == 0 {
|
||||||
|
// No iterator left to iterate.
|
||||||
|
c.curr = nil
|
||||||
|
return chunkenc.ValNone
|
||||||
|
}
|
||||||
|
} else {
|
||||||
currT = c.curr.AtT()
|
currT = c.curr.AtT()
|
||||||
if currT == c.lastT {
|
if currT == c.lastT {
|
||||||
// Ignoring sample for the same timestamp.
|
// Ignoring sample for the same timestamp.
|
||||||
|
@ -614,13 +624,6 @@ func (c *chainSampleIterator) Next() chunkenc.ValueType {
|
||||||
}
|
}
|
||||||
// Current iterator does not hold the smallest timestamp.
|
// Current iterator does not hold the smallest timestamp.
|
||||||
heap.Push(&c.h, c.curr)
|
heap.Push(&c.h, c.curr)
|
||||||
} else if c.curr.Err() != nil {
|
|
||||||
// Abort if we've hit an error.
|
|
||||||
return chunkenc.ValNone
|
|
||||||
} else if len(c.h) == 0 {
|
|
||||||
// No iterator left to iterate.
|
|
||||||
c.curr = nil
|
|
||||||
return chunkenc.ValNone
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c.curr = heap.Pop(&c.h).(chunkenc.Iterator)
|
c.curr = heap.Pop(&c.h).(chunkenc.Iterator)
|
||||||
|
|
Loading…
Reference in a new issue