mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 17:46:36 +00:00
chore(deps): update dependency golangci/golangci-lint to v2.2.1 (#2110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -316,6 +316,7 @@ func (c *Collector) collectService(ch chan<- prometheus.Metric, serviceName stri
|
||||
if startMode == c.apiStartModeValues[serviceConfig.StartType] {
|
||||
isCurrentStartMode = 1.0
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.startMode,
|
||||
prometheus.GaugeValue,
|
||||
@@ -401,7 +402,6 @@ func (c *Collector) queryAllServices() ([]windows.ENUM_SERVICE_STATUS_PROCESS, e
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
@@ -443,7 +443,6 @@ func (c *Collector) getProcessStartTime(pid uint32) (uint64, error) {
|
||||
)
|
||||
|
||||
err = windows.GetProcessTimes(handle, &creation, &exit, &krn, &user)
|
||||
|
||||
if err := windows.CloseHandle(handle); err != nil {
|
||||
c.logger.LogAttrs(context.Background(), slog.LevelWarn, "failed to close process handle",
|
||||
slog.Any("err", err),
|
||||
|
||||
Reference in New Issue
Block a user