mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebitenutil: close an HTTP response body (#2971)
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
f43c237c00
commit
97a9ee9601
@ -40,6 +40,7 @@ func OpenFile(path string) (ReadSeekCloser, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer res.Body.Close()
|
||||||
body, err := io.ReadAll(res.Body)
|
body, err := io.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user