Skip to content

Commit eb02adf

Browse files
committed
chore: replace for with range loop
1 parent ef633ff commit eb02adf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/corpus_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ func NewTestCase(file, name, input, sExpression string) TestCase {
7070

7171
func getTestCasesForFile(filename string, content string) []TestCase {
7272
testCases := []TestCase{}
73-
partsWithEmptyParts := TESTCASE_SEPERATOR.Split(content, -1)
7473
parts := []string{}
7574

76-
// remove empty parts
77-
for i := 0; i < len(partsWithEmptyParts); i++ {
78-
if partsWithEmptyParts[i] != "" {
79-
parts = append(parts, partsWithEmptyParts[i])
75+
// split and remove empty parts
76+
for _, part := range TESTCASE_SEPERATOR.Split(content, -1) {
77+
if part != "" {
78+
parts = append(parts, part)
8079
}
8180
}
8281

0 commit comments

Comments
 (0)