mirror of
https://github.com/golang/go
synced 2024-11-02 15:37:45 +00:00
internal/execabs: replace ioutil.WriteFile with os.WriteFile
Fixes #45532. Change-Id: I844acd50d6fa1ce918969bbb52f79dd7412d289f Reviewed-on: https://go-review.googlesource.com/c/go/+/309350 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
aad13cbb74
commit
cccd3ba912
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ func TestCommand(t *testing.T) {
|
|||
executable += ".exe"
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(tmpDir, executable), []byte{1, 2, 3}, 0111); err != nil {
|
||||
t.Fatalf("ioutil.WriteFile failed: %s", err)
|
||||
t.Fatalf("os.WriteFile failed: %s", err)
|
||||
}
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
|
@ -77,7 +77,7 @@ func TestLookPath(t *testing.T) {
|
|||
executable += ".exe"
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(tmpDir, executable), []byte{1, 2, 3}, 0111); err != nil {
|
||||
t.Fatalf("ioutil.WriteFile failed: %s", err)
|
||||
t.Fatalf("os.WriteFile failed: %s", err)
|
||||
}
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue