diff --git a/collector/textfile.go b/collector/textfile.go index d065d0cb..a77ad1e9 100644 --- a/collector/textfile.go +++ b/collector/textfile.go @@ -70,7 +70,7 @@ func (c *textFileCollector) Update(ch chan<- prometheus.Metric) (err error) { func (c *textFileCollector) parseTextFiles() []*dto.MetricFamily { error := 0.0 - metricFamilies := make([]*dto.MetricFamily, 0) + var metricFamilies []*dto.MetricFamily mtimes := map[string]time.Time{} // Iterate over files and accumulate their metrics.