mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: suppress "SA4006: this value of dstValues
is never used" error in golangci-lint
This commit is contained in:
parent
4fe67504f9
commit
7882a0dbbf
1 changed files with 2 additions and 4 deletions
|
@ -465,7 +465,6 @@ func finalizeAggrGeomean(iac *incrementalAggrContext) {
|
|||
}
|
||||
|
||||
func updateAggrAny(iac *incrementalAggrContext, values []float64) {
|
||||
dstValues := iac.ts.Values
|
||||
dstCounts := iac.values
|
||||
if dstCounts[0] > 0 {
|
||||
return
|
||||
|
@ -473,17 +472,16 @@ func updateAggrAny(iac *incrementalAggrContext, values []float64) {
|
|||
for i := range values {
|
||||
dstCounts[i] = 1
|
||||
}
|
||||
dstValues = append(dstValues[:0], values...)
|
||||
iac.ts.Values = append(iac.ts.Values[:0], values...)
|
||||
}
|
||||
|
||||
func mergeAggrAny(dst, src *incrementalAggrContext) {
|
||||
srcValues := src.ts.Values
|
||||
dstValues := dst.ts.Values
|
||||
srcCounts := src.values
|
||||
dstCounts := dst.values
|
||||
if dstCounts[0] > 0 {
|
||||
return
|
||||
}
|
||||
dstCounts[0] = srcCounts[0]
|
||||
dstValues = append(dstValues[:0], srcValues...)
|
||||
dst.ts.Values = append(dst.ts.Values[:0], srcValues...)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue