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

@ -10,6 +10,7 @@ import (
"fmt"
"io"
"log/slog"
"maps"
"mime"
"mime/multipart"
"net/textproto"
@ -17,13 +18,10 @@ import (
"os"
"runtime/debug"
"slices"
"sort"
"strings"
"sync"
"time"
"golang.org/x/exp/maps"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
@ -689,9 +687,7 @@ func sendReportDomain(ctx context.Context, log mlog.Log, resolver dns.Resolver,
report.PolicyPublished = last.PolicyPublished
// Process records in-order for testable results.
recstrs := maps.Keys(counts)
sort.Strings(recstrs)
for _, recstr := range recstrs {
for _, recstr := range slices.Sorted(maps.Keys(counts)) {
rc := counts[recstr]
rc.ReportRecord.Row.Count = rc.count
report.Records = append(report.Records, rc.ReportRecord)