mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
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:
parent
c8d0c87c17
commit
332932b7a8
9 changed files with 126 additions and 118 deletions
|
@ -1,9 +1,8 @@
|
|||
package health
|
||||
|
||||
import (
|
||||
"maps"
|
||||
"sync"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
)
|
||||
|
||||
var _ Provider = (*deduplicator)(nil)
|
||||
|
|
|
@ -7,12 +7,12 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/go-jose/go-jose/v3/jwt"
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/pomerium/pomerium/internal/httputil"
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/types/known/fieldmaskpb"
|
||||
|
@ -50,7 +49,7 @@ func (t *fieldMaskTree) addFieldPath(path string) {
|
|||
}
|
||||
node = m
|
||||
}
|
||||
maps.Clear(node)
|
||||
clear(node)
|
||||
}
|
||||
|
||||
// ErrDescriptorMismatch indicates an operation could not be performed because
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue