mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
perf: run perfsprint fixes
Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package config
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// flatten flattens the nested struct.
|
||||
//
|
||||
@@ -46,7 +49,7 @@ func flattenSlice(data []interface{}) map[string]string {
|
||||
ret[fmt.Sprintf("%d,%s", idx, fk)] = fv
|
||||
}
|
||||
default:
|
||||
ret[fmt.Sprint(idx)] = fmt.Sprint(typed)
|
||||
ret[strconv.Itoa(idx)] = fmt.Sprint(typed)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user