aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorian woolf <btw515wolf2@gmail.com>2021-04-08 20:42:47 +0800
committerIan Lance Taylor <iant@golang.org>2021-04-09 04:03:50 +0000
commit8518aac3147da163ac5accfacbf0c30f684177e2 (patch)
tree3ac9b197f16f68de21719f4611349fda602e0ae8 /src/crypto
parentd25c4fbe05e88580ce0a5cadc67e1c0ee27a2d1c (diff)
downloadgo-8518aac3147da163ac5accfacbf0c30f684177e2.tar.gz
go-8518aac3147da163ac5accfacbf0c30f684177e2.zip
crypto/x509: replace os.MkdirTemp with T.TempDir
Updates #45402 Change-Id: Ifb1fa5232a0fa1be62e886643cec9deaa3b312ad Reviewed-on: https://go-review.googlesource.com/c/go/+/308409 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/x509/root_unix_test.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/crypto/x509/root_unix_test.go b/src/crypto/x509/root_unix_test.go
index 38038a65f3..7118f12d74 100644
--- a/src/crypto/x509/root_unix_test.go
+++ b/src/crypto/x509/root_unix_test.go
@@ -147,11 +147,7 @@ func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) {
os.Setenv(certFileEnv, origFile)
}()
- tmpDir, err := os.MkdirTemp(os.TempDir(), "x509-issue35325")
- if err != nil {
- t.Fatalf("Failed to create temporary directory: %v", err)
- }
- defer os.RemoveAll(tmpDir)
+ tmpDir := t.TempDir()
rootPEMs := []string{
geoTrustRoot,