examples/dropfile: bug fix: go vet failed

This commit is contained in:
Hajime Hoshi 2023-01-22 17:31:24 +09:00
parent 8c25fac860
commit e03cb0d4df

View File

@ -29,7 +29,9 @@ type Game struct {
func (g *Game) Update() error {
for _, f := range ebiten.AppendDroppedFiles(nil) {
// Calling Close is not mandatory, but it is sligtly good to save memory.
defer f.Close()
defer func() {
_ = f.Close()
}()
fi, err := f.Stat()
if err != nil {