From: Dmitri Shuralyov Date: Sun, 9 Feb 2020 00:43:58 +0000 (-0500) Subject: test: close file in goFiles X-Git-Tag: go1.15beta1~1142 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=240498d63551d0a58a71d5ada457c73a71983a7c;p=gostls13.git test: close file in goFiles 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 --- 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 {