Skip to content

Commit 5cd8f6c

Browse files
committed
Remove ioutil
1 parent d258cc3 commit 5cd8f6c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"fmt"
55
"io"
6-
"io/ioutil"
76
"os"
87
"os/exec"
98
"path/filepath"

main_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"errors"
66
"fmt"
7-
"io/ioutil"
87
"log"
98
"os"
109
"os/exec"
@@ -14,7 +13,7 @@ import (
1413
)
1514

1615
func RunInTmpDir(run func()) {
17-
dir, err := ioutil.TempDir("", "")
16+
dir, err := os.MkdirTemp("", "")
1817
if err != nil {
1918
log.Fatal(err)
2019
}
@@ -505,13 +504,13 @@ func TestRenameWithSubmatch(t *testing.T) {
505504
}
506505

507506
for _, path := range []string{"git", "svn", "bzr"} {
508-
files, _ := ioutil.ReadDir(path)
507+
files, _ := os.ReadDir(path)
509508
if len(files) != 0 {
510509
t.Errorf("Failed: %d", len(files))
511510
}
512511
}
513512

514-
files, _ := ioutil.ReadDir("./lib")
513+
files, _ := os.ReadDir("./lib")
515514
if len(files) != 3 {
516515
t.Errorf("Failed: %d", len(files))
517516
}

0 commit comments

Comments
 (0)