@@ -1079,7 +1079,7 @@ func TestParserTokenizeNetworkingConfig(t *testing.T) {
10791079 {"newline-less" },
10801080 }
10811081
1082- for testnum := 0 ; testnum < len ( tests ); testnum ++ {
1082+ for testnum := range tests {
10831083 inCh := consumeString (tests [testnum ])
10841084 outCh := tokenizeNetworkingConfig (inCh )
10851085 result := collectIntoStringList (outCh )
@@ -1091,7 +1091,7 @@ func TestParserTokenizeNetworkingConfig(t *testing.T) {
10911091 }
10921092
10931093 ok := true
1094- for index := 0 ; index < len ( expected ); index ++ {
1094+ for index := range expected {
10951095 if result [index ] != expected [index ] {
10961096 ok = false
10971097 }
@@ -1116,7 +1116,7 @@ func TestParserSplitNetworkingConfig(t *testing.T) {
11161116 {"and" , "begin" , "with" , "an" , "empty" , "string" },
11171117 }
11181118
1119- for testnum := 0 ; testnum < len ( tests ); testnum ++ {
1119+ for testnum := range tests {
11201120 inCh := consumeString (tests [testnum ])
11211121 stringCh := tokenizeNetworkingConfig (inCh )
11221122 outCh := splitNetworkingConfig (stringCh )
@@ -1133,7 +1133,7 @@ func TestParserSplitNetworkingConfig(t *testing.T) {
11331133 }
11341134
11351135 ok := true
1136- for index := 0 ; index < len ( expected ); index ++ {
1136+ for index := range expected {
11371137 if result [index ] != expected [index ] {
11381138 ok = false
11391139 }
@@ -1152,14 +1152,14 @@ func TestParserParseNetworkingConfigVersion(t *testing.T) {
11521152 "VERSION=a,b" ,
11531153 }
11541154
1155- for testnum := 0 ; testnum < len ( successTests ); testnum ++ {
1155+ for testnum := range successTests {
11561156 test := []string {successTests [testnum ]}
11571157 if _ , err := networkingReadVersion (test ); err != nil {
11581158 t .Errorf ("success-test %d parsing failed: %v" , 1 + testnum , err )
11591159 }
11601160 }
11611161
1162- for testnum := 0 ; testnum < len ( successTests ); testnum ++ {
1162+ for testnum := range successTests {
11631163 test := []string {failureTests [testnum ]}
11641164 if _ , err := networkingReadVersion (test ); err == nil {
11651165 t .Errorf ("failure-test %d should have failed" , 1 + testnum )
@@ -1181,7 +1181,7 @@ func TestParserParseNetworkingConfigEntries(t *testing.T) {
11811181 "remove_nat_prefix 57005 /31" ,
11821182 }
11831183
1184- for testnum := 0 ; testnum < len ( tests ); testnum ++ {
1184+ for testnum := range tests {
11851185 test := strings .Split (tests [testnum ], " " )
11861186 parser := NetworkingParserByCommand (test [0 ])
11871187 if parser == nil {
0 commit comments