mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-08-20 18:33:52 -07:00
Fix linter warning (#3280)
Fix S1009: should omit nil check; len() for nil maps is defined as zero (gosimple) Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
47e2bb34ce
commit
58ac08e216
|
@ -446,7 +446,7 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if stats == nil || len(stats) < 1 {
|
if len(stats) == 0 {
|
||||||
// No stats returned; device does not support ethtool stats.
|
// No stats returned; device does not support ethtool stats.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue