@@ -181,7 +181,12 @@ func TestSimulation_SimulateAllPossibleGamesFromGameLog(t *testing.T) {
if err != nil {
t.Fatalf("Error opening file: %s", err)
}
- defer file.Close()
+ defer func(file *os.File) {
+ err := file.Close()
+ if err != nil {
+ t.Fatalf("Error closing file: %s", err)
+ }
+ }(file)
var words []string