update to go1.23 and replace golang.org/x/exp/maps with stdlib maps

This commit is contained in:
Mechiel Lukkien
2025-03-28 16:16:27 +01:00
parent 7a87522be0
commit 027e5754a0
21 changed files with 39 additions and 215 deletions

View File

@ -12,14 +12,13 @@ import (
"fmt"
"io/fs"
"log/slog"
"maps"
"os"
"path/filepath"
"slices"
"strings"
"time"
"golang.org/x/exp/maps"
"github.com/mjl-/mox/config"
"github.com/mjl-/mox/dns"
"github.com/mjl-/mox/junk"

View File

@ -2,14 +2,12 @@ package admin
import (
"fmt"
"sort"
"golang.org/x/exp/maps"
"maps"
"slices"
"github.com/mjl-/mox/config"
"github.com/mjl-/mox/dns"
"github.com/mjl-/mox/mox-"
"slices"
)
type TLSMode uint8
@ -92,8 +90,7 @@ func ClientConfigDomain(d dns.Domain) (rconfig ClientConfig, rerr error) {
}
}
// Go through the other listeners in consistent order.
names := maps.Keys(mox.Conf.Static.Listeners)
sort.Strings(names)
names := slices.Sorted(maps.Keys(mox.Conf.Static.Listeners))
for _, name := range names {
if gather(mox.Conf.Static.Listeners[name]) {
return