[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 удалений

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

@@ -3,7 +3,7 @@ package pluginapi
import (
"bytes"
"encoding/json"
"sort"
"slices"
"strings"
"sync"
"time"
@@ -193,8 +193,7 @@ func (s *MemoryStore) ListKeys(page int, count int, options ...ListKeysOption) (
return []string{}, nil
}
// TODO: Use slices.Sort once the toolchain got updated to go1.21
sort.Strings(allKeys)
slices.Sort(allKeys)
pageKeys := paginateSlice(allKeys, page, count)