Add TestParseBody_CloseCalledOnReadError to verify r.Close() is called even when ReadAll fails (resource leak fix). Enhance TestBuildStreamURL with: - Comment explaining the example.com case would panic before the nil pointer fix (net.ParseIP returns nil for non-IP hostnames) - IPv6 test cases to verify ip.To4() check works correctly - Clarifying comments for each test case category |
||
|---|---|---|
| .. | ||
| utils_test.go | ||
| utils.go | ||