Skip to content

Commit

Permalink
contrib/miekg/dns: rename getFreeAddr to getAddr for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahkm committed Dec 19, 2024
1 parent 7c08bec commit 277e527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/miekg/dns/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func startServer(t *testing.T, traced bool) (*dns.Server, func()) {
if traced {
h = dnstrace.WrapHandler(h)
}
addr := getFreeAddr(t).String()
addr := getAddr(t).String()
server := &dns.Server{
Addr: addr,
Net: "udp",
Expand Down Expand Up @@ -190,7 +190,7 @@ func assertClientSpan(t *testing.T, s mocktracer.Span) {
assert.Equal(t, ext.SpanKindClient, s.Tag(ext.SpanKind))
}

func getFreeAddr(t *testing.T) net.Addr {
func getAddr(t *testing.T) net.Addr {
li, err := net.Listen("tcp4", "127.0.0.1:2020")
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 277e527

Please sign in to comment.