mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-03 17:16:37 +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:
@@ -217,6 +217,7 @@ func (c *Collector) convertMetricFamily(logger *slog.Logger, metricFamily *dto.M
|
||||
for _, q := range metric.GetSummary().GetQuantile() {
|
||||
quantiles[q.GetQuantile()] = q.GetValue()
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstSummary(
|
||||
prometheus.NewDesc(
|
||||
metricFamily.GetName(),
|
||||
@@ -232,6 +233,7 @@ func (c *Collector) convertMetricFamily(logger *slog.Logger, metricFamily *dto.M
|
||||
for _, b := range metric.GetHistogram().GetBucket() {
|
||||
buckets[b.GetUpperBound()] = b.GetCumulativeCount()
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstHistogram(
|
||||
prometheus.NewDesc(
|
||||
metricFamily.GetName(),
|
||||
@@ -290,8 +292,8 @@ type carriageReturnFilteringReader struct {
|
||||
// Read returns data from the underlying io.Reader, but with \r filtered out.
|
||||
func (cr carriageReturnFilteringReader) Read(p []byte) (int, error) {
|
||||
buf := make([]byte, len(p))
|
||||
n, err := cr.r.Read(buf)
|
||||
|
||||
n, err := cr.r.Read(buf)
|
||||
if err != nil && err != io.EOF {
|
||||
return n, err
|
||||
}
|
||||
@@ -356,7 +358,6 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil && directory != "" {
|
||||
errs = append(errs, fmt.Errorf("error reading textfile directory %q: %w", directory, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user