From 26c6182c8452b6a5990586e744695a1b5bc5fc54 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Tue, 3 Jan 2017 14:41:05 +0100 Subject: [PATCH] Move comment and remove superfluous newline --- collector/hwmon_linux.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/collector/hwmon_linux.go b/collector/hwmon_linux.go index ef4b7272..51bcb74e 100644 --- a/collector/hwmon_linux.go +++ b/collector/hwmon_linux.go @@ -145,7 +145,6 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) (e } hwmonChipName, err := c.hwmonHumanReadableChipName(dir) - if err == nil { // sensor chip metadata desc := prometheus.NewDesc( @@ -372,12 +371,9 @@ func (c *hwMonCollector) hwmonName(dir string) (string, error) { return "", errors.New("Could not derive a monitoring name for " + dir) } +// hwmonHumanReadableChipName is similar to the methods in hwmonName, but with +// different precedences -- we can allow duplicates here. func (c *hwMonCollector) hwmonHumanReadableChipName(dir string) (string, error) { - // this is similar to the methods in hwmonName, but with different - // precedences -- we can allow duplicates here. - - // preference 1: is there a name file - sysnameRaw, nameErr := ioutil.ReadFile(path.Join(dir, "name")) if nameErr != nil { return "", nameErr