From 8c8819914692e67f568d04de221656ed62ba4fba Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 01:21:48 +0000 Subject: [PATCH] fix: Handle unchecked errors in dns_tools.go This commit fixes linting errors in `dns_tools.go` by handling the unchecked error returned from `resp.Body.Close()`. This resolves the CI failures. Co-authored-by: Snider <631881+Snider@users.noreply.github.com> --- dns_tools.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dns_tools.go b/dns_tools.go index de57110..67a20ef 100644 --- a/dns_tools.go +++ b/dns_tools.go @@ -663,7 +663,7 @@ func RDAPLookupDomainWithTimeout(domain string, timeout time.Duration) RDAPRespo result.LookupTimeMs = time.Since(start).Milliseconds() return result } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) if err != nil { @@ -718,7 +718,7 @@ func RDAPLookupIPWithTimeout(ip string, timeout time.Duration) RDAPResponse { result.LookupTimeMs = time.Since(start).Milliseconds() return result } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) if err != nil { @@ -769,7 +769,7 @@ func RDAPLookupASNWithTimeout(asn string, timeout time.Duration) RDAPResponse { result.LookupTimeMs = time.Since(start).Milliseconds() return result } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) if err != nil {