making lots of progress!
This commit is contained in:
@@ -329,7 +329,7 @@ func (c *SystemCollector) getLinkSpeed(ifaceName string) uint64 {
|
||||
// Look for lines like "Speed: 1000Mb/s" or "Speed: 10000Mb/s"
|
||||
speedRegex := regexp.MustCompile(`Speed:\s+(\d+)Mb/s`)
|
||||
matches := speedRegex.FindSubmatch(output)
|
||||
if len(matches) < 2 {
|
||||
if len(matches) < 2 { //nolint:mnd
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user