Commit 8e436f6
committed
fix(provider-tck): check the control response body's Close
`defer resp.Body.Close()` discards an error errcheck requires to be handled,
so `make lint` failed on the suite module and, by inheritance, on all three
stacked branches.
The shape was invisible until this client moved onto the base branch: at its
previous home in providers/flagd/e2e it sat behind `//go:build e2e`, and
golangci-lint does not analyse files excluded by a build tag. Nothing about the
code changed -- only whether anything looked at it.
Discarded explicitly rather than logged: the request has already returned its
status, the body is drained immediately above, and a failure to close a body
the caller is finished with tells an adopter nothing it can act on. `_ =`
matches the `_, _ = io.Copy` on the following line.
Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>1 parent 84fd316 commit 8e436f6
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
0 commit comments