fix(ci): go mod tidy + check resp.Body.Close error (template-go-agent#3)
CD / Lint / Test / Vet (push) Successful in 24s
CD / Build & Import (push) Failing after 1s
CD / Deploy via GitOps (push) Has been skipped

Template shipped with no go.sum and an unchecked resp.Body.Close(),
both failing `task check` (golangci-lint errcheck) on every push since
bootstrap -- every repo generated from this template inherited the same
red CI. go.sum generated via `go mod tidy`; Close() error explicitly
discarded (best-effort cleanup, nothing actionable to do with it).
This commit is contained in:
2026-07-24 15:19:17 +02:00
parent c6f8ea477b
commit 06d4ac6076
3 changed files with 156 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func (m *Model) GenerateContent(ctx context.Context, req *adkmodel.LLMRequest, _
yield(nil, fmt.Errorf("http: %w", err))
return
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
raw, err := io.ReadAll(resp.Body)
if err != nil {