mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 06:31:46 +01:00
Revert wrong use of slices.Delete()
This commit is contained in:
@@ -337,7 +337,9 @@ func (c *metricAggregator) DeleteAggregation(name string) error {
|
|||||||
if i == -1 {
|
if i == -1 {
|
||||||
return fmt.Errorf("no aggregation for metric name %s", name)
|
return fmt.Errorf("no aggregation for metric name %s", name)
|
||||||
}
|
}
|
||||||
c.functions = slices.Delete(c.functions, i, i)
|
copy(c.functions[i:], c.functions[i+1:])
|
||||||
|
c.functions[len(c.functions)-1] = nil
|
||||||
|
c.functions = c.functions[:len(c.functions)-1]
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user