From 277e527c9f8124068bffb1c9f2d101098d2b651c Mon Sep 17 00:00:00 2001 From: Hannah Kim Date: Thu, 19 Dec 2024 09:47:58 -0500 Subject: [PATCH] contrib/miekg/dns: rename getFreeAddr to getAddr for clarity --- contrib/miekg/dns/dns_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/miekg/dns/dns_test.go b/contrib/miekg/dns/dns_test.go index 609a757902..6e38fbaca5 100644 --- a/contrib/miekg/dns/dns_test.go +++ b/contrib/miekg/dns/dns_test.go @@ -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", @@ -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)