]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/testdir: remove temp files
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 5 Sep 2024 05:40:31 +0000 (22:40 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 6 Sep 2024 13:27:07 +0000 (13:27 +0000)
commitca2cb8d7a77c06530e2cef3931c195ad8abb2b4f
tree7e1f0529ce15999cda0f02a57254d897a30f10d1
parent2b832b4296220aab1189e1b7e939e4e68e8924b9
cmd/internal/testdir: remove temp files

Function stdlibImportcfgFile creates a temporary directory and a file in
it, which are never deleted.

The easiest to fix this (without creating the file unnecessarily, or
creating it multiple times) is to add a global tmpDir and use it in
stdlibImportcfgFile.

Change-Id: Ia971b4478d9e0fa7c3a9b4c66e13fd5a4af9cbaa
Reviewed-on: https://go-review.googlesource.com/c/go/+/610818
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/internal/testdir/testdir_test.go