aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-14 19:09:21 -0500
committerChristian Cleberg <[email protected]>2026-07-14 19:09:21 -0500
commitedfc25e18c4585b2deed7b7d9531cc3fcecf1d4f (patch)
tree39a31300036b79804d96d8920083b3ffb160b885 /util.go
parenteea656e612d1a31b461fe73f2e26dfe526acfb83 (diff)
downloaddevianter-edfc25e18c4585b2deed7b7d9531cc3fcecf1d4f.tar.gz
devianter-edfc25e18c4585b2deed7b7d9531cc3fcecf1d4f.tar.bz2
devianter-edfc25e18c4585b2deed7b7d9531cc3fcecf1d4f.zip
fix: resolve golandci-lint errors
Diffstat (limited to 'util.go')
-rw-r--r--util.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/util.go b/util.go
index dddd7db..ac3e3e4 100644
--- a/util.go
+++ b/util.go
@@ -94,7 +94,11 @@ func request(uri string, other ...string) reqrt {
r.Err = e
return r
}
- defer resp.Body.Close()
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ try(err)
+ }
+ }()
body, e := io.ReadAll(resp.Body)
if e != nil {