Skip to content

Commit e56f2fd

Browse files
author
ffranr
authored
Merge pull request #1283 from zhoufanjin/main
refactor: using slices.Contains to simplify the code
2 parents 8719b40 + 6930554 commit e56f2fd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

itest/loadtest/load_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package loadtest
55
import (
66
"context"
77
"fmt"
8+
"slices"
89
"testing"
910
"time"
1011

@@ -124,11 +125,5 @@ func shouldRunCase(name string, configuredCases []string) bool {
124125
return true
125126
}
126127

127-
for _, c := range configuredCases {
128-
if c == name {
129-
return true
130-
}
131-
}
132-
133-
return false
128+
return slices.Contains(configuredCases, name)
134129
}

0 commit comments

Comments
 (0)