Skip to main content

What it flags

The rule matches a local net/http Get or Post with a checked error when the next return reads the entire body through io.ReadAll. Close the body once the request succeeds. Ownership transfers and other control-flow paths are outside the rule’s initial coverage. The rule recognizes a deferred closure registered earlier in the same block when the closure checks and closes the response variable declared in that block.