Skip to content

Commit 8804ce1

Browse files
authored
diskstats: Simplify condition (#3290)
As the comment says, this can be simplified now. Signed-off-by: Manuel Rüger <[email protected]>
1 parent e5caa39 commit 8804ce1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

collector/diskstats_linux.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,9 @@ func getUdevDeviceProperties(major, minor uint32) (udevInfo, error) {
398398

399399
line = strings.TrimPrefix(line, udevDevicePropertyPrefix)
400400

401-
/* TODO: After we drop support for Go 1.17, the condition below can be simplified to:
402-
403401
if name, value, found := strings.Cut(line, "="); found {
404402
info[name] = value
405403
}
406-
*/
407-
if fields := strings.SplitN(line, "=", 2); len(fields) == 2 {
408-
info[fields[0]] = fields[1]
409-
}
410404
}
411405

412406
return info, nil

0 commit comments

Comments
 (0)