Change Sprintf interpolation to use explicit types

Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
retryW 2021-01-13 14:31:26 +11:00 committed by Ben Ridley
parent 3da11645cf
commit 6f941044c7
1 changed files with 2 additions and 2 deletions

View File

@ -171,8 +171,8 @@ func (c *OSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, er
c.OSInformation,
prometheus.GaugeValue,
1.0,
fmt.Sprintf("Microsoft %v", product), // Caption
fmt.Sprintf("%v.%v.%v", nwgi.Wki102_ver_major, nwgi.Wki102_ver_minor, buildNum), // Version
fmt.Sprintf("Microsoft %s", product), // Caption
fmt.Sprintf("%d.%d.%s", nwgi.Wki102_ver_major, nwgi.Wki102_ver_minor, buildNum), // Version
)
gmse, err := sysinfoapi.GlobalMemoryStatusEx()