mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
go/internal/gccgoimporter: replace os.MkdirTemp with T.TempDir
Updates #45402 Change-Id: Ie84795ed456883c0558fa9b5e3f2186f5f2c0fd9 Reviewed-on: https://go-review.googlesource.com/c/go/+/309356 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
d1f8104b58
commit
de7a87ef06
1 changed files with 2 additions and 12 deletions
|
@ -149,21 +149,11 @@ func TestObjImporter(t *testing.T) {
|
|||
}
|
||||
t.Logf("gccgo version %d.%d", major, minor)
|
||||
|
||||
tmpdir, err := os.MkdirTemp("", "TestObjImporter")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(tmpdir)
|
||||
|
||||
tmpdir := t.TempDir()
|
||||
initmap := make(map[*types.Package]InitData)
|
||||
imp := GetImporter([]string{tmpdir}, initmap)
|
||||
|
||||
artmpdir, err := os.MkdirTemp("", "TestObjImporter")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(artmpdir)
|
||||
|
||||
artmpdir := t.TempDir()
|
||||
arinitmap := make(map[*types.Package]InitData)
|
||||
arimp := GetImporter([]string{artmpdir}, arinitmap)
|
||||
|
||||
|
|
Loading…
Reference in a new issue