mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 09:19:39 +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
|
@ -3,11 +3,11 @@ package databroker
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"maps"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
|
@ -164,8 +164,7 @@ func (src *ConfigSource) buildNewConfigLocked(ctx context.Context, cfg *config.C
|
|||
}
|
||||
|
||||
func (src *ConfigSource) applySettingsLocked(ctx context.Context, cfg *config.Config) {
|
||||
ids := maps.Keys(src.dbConfigs)
|
||||
sort.Strings(ids)
|
||||
ids := slices.Sorted(maps.Keys(src.dbConfigs))
|
||||
|
||||
var certsIndex *cryptutil.CertificatesIndex
|
||||
if src.enableValidation {
|
||||
|
|
|
@ -6,13 +6,13 @@ import (
|
|||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"net"
|
||||
"net/http"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/go-jose/go-jose/v3"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/urlutil"
|
||||
|
@ -71,7 +71,6 @@ func checkRoutesReachable(
|
|||
if err != nil {
|
||||
return fmt.Errorf("error getting route hosts: %w", err)
|
||||
}
|
||||
slices.Sort(hosts)
|
||||
|
||||
client := getPingHTTPClient()
|
||||
var errs []error
|
||||
|
@ -119,5 +118,5 @@ func getHosts(configs []*configpb.Config) ([]string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
return maps.Keys(hosts), nil
|
||||
return slices.Sorted(maps.Keys(hosts)), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue