Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
strategy:
matrix:
go: ["1.21", "stable"]
go: ["1.22", "stable"]
name: test
runs-on: ubuntu-latest
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
golangci:
strategy:
matrix:
go: ["1.21", "stable"]
go: ["1.22", "stable"]
lint: ["v2.1.6"]
name: lint
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/simplesurance/cfdns

go 1.21
toolchain go1.24.1
go 1.23.0

toolchain go1.24.3

require (
github.com/fatih/color v1.18.0
Expand Down
4 changes: 2 additions & 2 deletions log/testtarget/testtarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ package testtarget

import (
"fmt"
"maps"
"slices"
"strings"
"testing"

"github.com/fatih/color"
"golang.org/x/exp/maps"

"github.com/simplesurance/cfdns/log"
)
Expand All @@ -38,7 +38,7 @@ func (t testDriver) Send(l *log.Entry) {

fmt.Fprintf(msg, "[%s] %s", l.Severity, l.Message)

keys := maps.Keys(l.Tags)
keys := slices.Collect(maps.Keys(l.Tags))
slices.Sort(keys)
for _, key := range keys {
fmt.Fprintf(msg, "\n- %s: %v", key, format(l.Tags[key]))
Expand Down
4 changes: 2 additions & 2 deletions log/texttarget/textlogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ package texttarget
import (
"fmt"
"io"
"maps"
"slices"
"sync"
"time"

"github.com/fatih/color"
"golang.org/x/exp/maps"

"github.com/simplesurance/cfdns/log"
)
Expand Down Expand Up @@ -66,7 +66,7 @@ func (l *logger) Send(entry *log.Entry) {

fmt.Fprint(w, msg)

keys := maps.Keys(entry.Tags)
keys := slices.Collect(maps.Keys(entry.Tags))
slices.Sort(keys)

for _, key := range keys {
Expand Down
7 changes: 4 additions & 3 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package cfdns

import (
"fmt"
"maps"
"net/http"
"net/url"
"slices"
"strings"

"golang.org/x/exp/maps"
)

type request struct {
Expand All @@ -33,7 +33,8 @@ func (e HTTPError) Error() string {
msg := &strings.Builder{}

fmt.Fprintf(msg, "HTTP %d\n", e.Code)
headers := maps.Keys(e.Headers)
headers := slices.Collect(maps.Keys(e.Headers))
slices.Sort(headers)
for _, k := range headers {
fmt.Fprintf(msg, "%s: %s\n", k, e.Headers.Get(k))
}
Expand Down
Loading