From 8804ce1551d022ce6823b50e7129ff6306ec1569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Mon, 31 Mar 2025 12:47:22 +0200 Subject: [PATCH] diskstats: Simplify condition (#3290) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the comment says, this can be simplified now. Signed-off-by: Manuel RĂ¼ger --- collector/diskstats_linux.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/collector/diskstats_linux.go b/collector/diskstats_linux.go index c083a3f0..ad6ff3cb 100644 --- a/collector/diskstats_linux.go +++ b/collector/diskstats_linux.go @@ -398,15 +398,9 @@ func getUdevDeviceProperties(major, minor uint32) (udevInfo, error) { line = strings.TrimPrefix(line, udevDevicePropertyPrefix) - /* TODO: After we drop support for Go 1.17, the condition below can be simplified to: - if name, value, found := strings.Cut(line, "="); found { info[name] = value } - */ - if fields := strings.SplitN(line, "=", 2); len(fields) == 2 { - info[fields[0]] = fields[1] - } } return info, nil