diff options
author | Dmitri Shuralyov <dmitshur@golang.org> | 2020-02-08 19:43:58 -0500 |
---|---|---|
committer | Dmitri Shuralyov <dmitshur@golang.org> | 2020-02-21 22:00:03 +0000 |
commit | 240498d63551d0a58a71d5ada457c73a71983a7c (patch) | |
tree | 9e76845346c915c90104cf41e2b0591b75dd6f3c /test/run.go | |
parent | baea3cd7c9e7ae27f7e5d44874a9afd249458df5 (diff) | |
download | go-240498d63551d0a58a71d5ada457c73a71983a7c.tar.gz go-240498d63551d0a58a71d5ada457c73a71983a7c.zip |
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 <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'test/run.go')
-rw-r--r-- | test/run.go | 1 |
1 files changed, 1 insertions, 0 deletions
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 { |