diff --git a/examples/airhorn/main.go b/examples/airhorn/main.go index cc61301..160ca85 100644 --- a/examples/airhorn/main.go +++ b/examples/airhorn/main.go @@ -131,6 +131,10 @@ func loadSound() error { // If this is the end of the file, just return. if err == io.EOF || err == io.ErrUnexpectedEOF { + file.Close() + if err != nil { + return err + } return nil }