diff options
| author | KimMachineGun <geon0250@gmail.com> | 2021-04-03 08:10:47 +0000 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2021-04-05 17:51:15 +0000 |
| commit | a040ebeb980d1a712509fa3d8073cf6ae16cbe78 (patch) | |
| tree | 5dbb3b41a6506cb0251e49a2bf83cccf3aa571c4 /misc/cgo/testplugin | |
| parent | 9abedf482752cac0a29c56804f7d34698aa044f2 (diff) | |
| download | go-a040ebeb980d1a712509fa3d8073cf6ae16cbe78.tar.xz | |
all: update references to symbols moved from io/ioutil to io
Update references missed in CL 263142.
For #41190
Change-Id: I778760a6a69bd0440fec0848bdef539c9ccb4ee1
GitHub-Last-Rev: dda42b09fff36dc08ec1cdec50cc19e3da5058e5
GitHub-Pull-Request: golang/go#42874
Reviewed-on: https://go-review.googlesource.com/c/go/+/273946
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'misc/cgo/testplugin')
| -rw-r--r-- | misc/cgo/testplugin/plugin_test.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go index 8869528015..b894e8d30d 100644 --- a/misc/cgo/testplugin/plugin_test.go +++ b/misc/cgo/testplugin/plugin_test.go @@ -9,7 +9,6 @@ import ( "context" "flag" "fmt" - "io/ioutil" "log" "os" "os/exec" @@ -35,7 +34,7 @@ func testMain(m *testing.M) int { // Copy testdata into GOPATH/src/testplugin, along with a go.mod file // declaring the same path. - GOPATH, err := ioutil.TempDir("", "plugin_test") + GOPATH, err := os.MkdirTemp("", "plugin_test") if err != nil { log.Panic(err) } @@ -50,7 +49,7 @@ func testMain(m *testing.M) int { if err := overlayDir(dstRoot, srcRoot); err != nil { log.Panic(err) } - if err := ioutil.WriteFile(filepath.Join(dstRoot, "go.mod"), []byte("module testplugin\n"), 0666); err != nil { + if err := os.WriteFile(filepath.Join(dstRoot, "go.mod"), []byte("module testplugin\n"), 0666); err != nil { log.Panic(err) } } @@ -72,11 +71,11 @@ func testMain(m *testing.M) int { goCmd(nil, "build", "-buildmode=plugin", "./plugin1") goCmd(nil, "build", "-buildmode=plugin", "./plugin2") - so, err := ioutil.ReadFile("plugin2.so") + so, err := os.ReadFile("plugin2.so") if err != nil { log.Panic(err) } - if err := ioutil.WriteFile("plugin2-dup.so", so, 0444); err != nil { + if err := os.WriteFile("plugin2-dup.so", so, 0444); err != nil { log.Panic(err) } |
