From 240498d63551d0a58a71d5ada457c73a71983a7c Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 8 Feb 2020 19:43:58 -0500 Subject: [PATCH] test: close file in goFiles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Brad's battery died on a plane and the file stayed open for 8 years without anyone noticing. 😄 Someone noticed in https://github.com/gopherjs/gopherjs/pull/950. Updates #2833 Change-Id: I46b28ac014a8c355be94e026615f119f96e5d51a Reviewed-on: https://go-review.googlesource.com/c/go/+/218700 Run-TryBot: Dmitri Shuralyov TryBot-Result: Gobot Gobot Reviewed-by: Emmanuel Odeke --- test/run.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/run.go b/test/run.go index a7bee65275..7129ca3228 100644 --- a/test/run.go +++ b/test/run.go @@ -203,6 +203,7 @@ func goFiles(dir string) []string { f, err := os.Open(dir) check(err) dirnames, err := f.Readdirnames(-1) + f.Close() check(err) names := []string{} for _, name := range dirnames { -- 2.50.0