Replace usages of x/exp/maps + bump golang.org/x/exp (#5221)

Bump golang.org/x/exp; replace usages of x/exp/maps with stdlib equivalents
This commit is contained in:
Joe Kralicky 2024-08-15 17:49:24 -04:00 committed by GitHub
parent c8d0c87c17
commit 332932b7a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 126 additions and 118 deletions

View file

@ -4,14 +4,14 @@ package inmemory
import (
"context"
"fmt"
"sort"
"maps"
"slices"
"sync"
"sync/atomic"
"time"
"github.com/google/btree"
"github.com/rs/zerolog"
"golang.org/x/exp/maps"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/fieldmaskpb"
"google.golang.org/protobuf/types/known/timestamppb"
@ -206,8 +206,7 @@ func (backend *Backend) ListTypes(_ context.Context) ([]string, error) {
keys := maps.Keys(backend.lookup)
backend.mu.Unlock()
sort.Strings(keys)
return keys, nil
return slices.Sorted(keys), nil
}
// Put puts a record into the in-memory store.