mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-24 01:42:05 +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 {
|
||||
return nil, err
|
||||
}
|
||||
defer res.Body.Close()
|
||||
body, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user