mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Use for range over integers
This appears in Go 1.22 (see https://tip.golang.org/ref/spec#For_range). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -191,7 +191,7 @@ func validateID(id string) error {
|
||||
}
|
||||
|
||||
// Allowed characters: 0-9 A-Z a-z _ + - .
|
||||
for i := 0; i < len(id); i++ {
|
||||
for i := range len(id) {
|
||||
c := id[i]
|
||||
switch {
|
||||
case c >= 'a' && c <= 'z':
|
||||
|
||||
Reference in New Issue
Block a user