Template
fix(ci): go mod tidy + check resp.Body.Close error (template-go-agent#3)
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user