use strings.SplitSeq where possible

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-09-08 18:14:37 +02:00
parent 4e3e9bfb70
commit b97525a78d
21 changed files with 23 additions and 33 deletions

View File

@@ -1263,7 +1263,7 @@ func parseLinuxResourcesDeviceAccess(device string) (specs.LinuxDeviceCgroup, er
minor = &m
}
access = value[2]
for _, c := range strings.Split(access, "") {
for c := range strings.SplitSeq(access, "") {
if !cgroupDeviceAccess[c] {
return specs.LinuxDeviceCgroup{}, fmt.Errorf("invalid device access in device-access-add: %s", c)
}