[MM-57356] Make use of go1.21 features (#26620)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3c45c44cb1
Коммит
1e0de8f559
@@ -4,10 +4,9 @@
|
||||
package searchtest
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
pUtils "github.com/mattermost/mattermost/server/public/utils"
|
||||
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store"
|
||||
)
|
||||
|
||||
@@ -36,12 +35,12 @@ type searchTest struct {
|
||||
func filterTestsByTag(tests []searchTest, tags ...string) []searchTest {
|
||||
filteredTests := []searchTest{}
|
||||
for _, test := range tests {
|
||||
if pUtils.Contains(test.Tags, EngineAll) {
|
||||
if slices.Contains(test.Tags, EngineAll) {
|
||||
filteredTests = append(filteredTests, test)
|
||||
continue
|
||||
}
|
||||
for _, tag := range tags {
|
||||
if pUtils.Contains(test.Tags, tag) {
|
||||
if slices.Contains(test.Tags, tag) {
|
||||
filteredTests = append(filteredTests, test)
|
||||
break
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user