Skip to content

Commit d568c79

Browse files
committed
Fix errcheck linter: explicitly ignore io.Copy error
The linter requires explicit error handling. Since we're in an error path and only draining the response body for connection reuse, we explicitly ignore the error with blank identifiers.
1 parent cfb8ab8 commit d568c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

telemetry/featureflag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func fetchFeatureFlag(ctx context.Context, host string, httpClient *http.Client)
185185

186186
if resp.StatusCode != http.StatusOK {
187187
// Read and discard body to allow HTTP connection reuse
188-
io.Copy(io.Discard, resp.Body)
188+
_, _ = io.Copy(io.Discard, resp.Body)
189189
return false, fmt.Errorf("feature flag check failed: %d", resp.StatusCode)
190190
}
191191

0 commit comments

Comments
 (0)