[MM-57356] Make use of go1.21 features (#26620)

Этот коммит содержится в:
Ben Schumacher
2024-04-04 13:44:03 +02:00
коммит произвёл GitHub
родитель 3c45c44cb1
Коммит 1e0de8f559
24 изменённых файлов: 59 добавлений и 507 удалений

Просмотреть файл

@@ -11,6 +11,7 @@ import (
"math/rand"
"os"
"path/filepath"
"slices"
"sort"
"time"
@@ -360,7 +361,7 @@ func sampledataCmdF(c client.Client, command *cobra.Command, args []string) erro
totalUsers := 3 + rand.Intn(3)
for len(users) < totalUsers {
user := allUsers[rand.Intn(len(allUsers))]
if !pUtils.Contains(users, user) {
if !slices.Contains(users, user) {
users = append(users, user)
}
}
@@ -375,7 +376,7 @@ func sampledataCmdF(c client.Client, command *cobra.Command, args []string) erro
totalUsers := 3 + rand.Intn(3)
for len(users) < totalUsers {
user := allUsers[rand.Intn(len(allUsers))]
if !pUtils.Contains(users, user) {
if !slices.Contains(users, user) {
users = append(users, user)
}
}