making lots of progress!

This commit is contained in:
2025-07-24 16:09:00 +02:00
parent c2040a5c08
commit 6b0628792a
28 changed files with 1917 additions and 289 deletions

View File

@@ -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
}