Skip to content

Commit

Permalink
Merge pull request #1283 from zhoufanjin/main
Browse files Browse the repository at this point in the history
refactor: using slices.Contains to simplify the code
  • Loading branch information
ffranr authored Jan 11, 2025
2 parents 8719b40 + 6930554 commit e56f2fd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions itest/loadtest/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package loadtest
import (
"context"
"fmt"
"slices"
"testing"
"time"

Expand Down Expand Up @@ -124,11 +125,5 @@ func shouldRunCase(name string, configuredCases []string) bool {
return true
}

for _, c := range configuredCases {
if c == name {
return true
}
}

return false
return slices.Contains(configuredCases, name)
}

0 comments on commit e56f2fd

Please sign in to comment.