mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
app/vmselect/promql: suppress "SA4006: this value of dstValues
is never used" error in golangci-lint
This commit is contained in:
parent
8bb44a5d09
commit
f3d9a5b0ec
@ -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 New Issue
Block a user