mirror of
https://github.com/prometheus/prometheus.git
synced 2025-12-06 10:01:02 +01:00
The `:=` causes new variables to be created, which means the outer slice stays at nil, and new memory is allocated every time round the loop. Extracted from https://github.com/prometheus/prometheus/pull/16182 Credit to @bwplotka. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>