From e42979e1ff36104e4ebb71d7a47067b5c6859350 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Mon, 13 Apr 2026 18:34:27 +0200 Subject: [PATCH] Fix unchecked error on resp.Body.Close in genmodels Signed-off-by: Sacha Al Himdani --- internal/cmd/genmodels/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/genmodels/main.go b/internal/cmd/genmodels/main.go index ea4792d7c..7be707fe4 100644 --- a/internal/cmd/genmodels/main.go +++ b/internal/cmd/genmodels/main.go @@ -96,7 +96,7 @@ func main() { fmt.Fprintf(os.Stderr, "cannot fetch models: %v\n", err) os.Exit(1) } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode != http.StatusOK { fmt.Fprintf(os.Stderr, "cannot fetch models: unexpected status %s\n", resp.Status)