mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
use strings.SplitSeq where possible
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user