Range var capturing?
This commit is contained in:
parent
ea6f44e867
commit
619e4409e1
1 changed files with 1 additions and 0 deletions
1
main.go
1
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",
|
||||
|
|
Loading…
Reference in a new issue