Skip to content

Commit eeef78a

Browse files
committed
stop using the deprecated io/ioutil package
1 parent 189a220 commit eeef78a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

fslock_plan9.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import "strings"
55
// Opening an exclusive-use file returns an error.
66
// The expected error strings are:
77
//
8-
// - "open/create -- file is locked" (cwfs, kfs)
9-
// - "exclusive lock" (fossil)
10-
// - "exclusive use file already open" (ramfs)
8+
// - "open/create -- file is locked" (cwfs, kfs)
9+
// - "exclusive lock" (fossil)
10+
// - "exclusive use file already open" (ramfs)
1111
//
1212
// See https://github.com/golang/go/blob/go1.15rc1/src/cmd/go/internal/lockedfile/lockedfile_plan9.go#L16
1313
var lockedErrStrings = [...]string{

fslock_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package fslock_test
22

33
import (
44
"bufio"
5-
"io/ioutil"
65
"os"
76
"os/exec"
87
"path"
@@ -117,7 +116,7 @@ func TestLockedByOthers(t *testing.T) {
117116
return
118117
}
119118

120-
confdir, err := ioutil.TempDir("", "go-fs-lock-test")
119+
confdir, err := os.MkdirTemp("", "go-fs-lock-test")
121120
if err != nil {
122121
t.Fatalf("creating temporary directory: %v", err)
123122
}

0 commit comments

Comments
 (0)