From 619e4409e18082542d2f4c87375f2c941bb89773 Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Sat, 7 Jan 2023 17:49:22 +1100 Subject: [PATCH] Range var capturing? --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 14d52f6..93bb7dc 100644 --- a/main.go +++ b/main.go @@ -182,6 +182,7 @@ func main() { // These are GaugeFuncs to more closely align Prometheus scrape time with // the modbus scrape time. for addr, reg := range sungrowInputRegs { + addr, reg := addr, reg promauto.NewGaugeFunc( prometheus.GaugeOpts{ Namespace: "sungrow",