]> Cypherpunks repositories - gostls13.git/commitdiff
internal/execabs: replace ioutil.WriteFile with os.WriteFile
authorManlio Perillo <manlio.perillo@gmail.com>
Mon, 12 Apr 2021 19:46:14 +0000 (21:46 +0200)
committerIan Lance Taylor <iant@golang.org>
Mon, 12 Apr 2021 21:57:23 +0000 (21:57 +0000)
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>

src/internal/execabs/execabs_test.go

index 7609b2106a6254e1cf74884797957ab7591eb050..97a3f39b4a24bbca1e3496d2cfa02defe82ce139 100644 (file)
@@ -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 {