mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev https://golang.org/cl/163085
This commit is contained in:
parent
1eba218e44
commit
b0683bd77a
30 changed files with 87 additions and 68 deletions
|
|
@ -6,6 +6,7 @@ package exec
|
|||
|
||||
import (
|
||||
"io";
|
||||
"io/ioutil";
|
||||
"testing";
|
||||
)
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ func TestRunCat(t *testing.T) {
|
|||
}
|
||||
io.WriteString(cmd.Stdin, "hello, world\n");
|
||||
cmd.Stdin.Close();
|
||||
buf, err := io.ReadAll(cmd.Stdout);
|
||||
buf, err := ioutil.ReadAll(cmd.Stdout);
|
||||
if err != nil {
|
||||
t.Fatalf("reading from /bin/cat: %v", err)
|
||||
}
|
||||
|
|
@ -35,7 +36,7 @@ func TestRunEcho(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("opencmd /bin/echo: %v", err)
|
||||
}
|
||||
buf, err := io.ReadAll(cmd.Stdout);
|
||||
buf, err := ioutil.ReadAll(cmd.Stdout);
|
||||
if err != nil {
|
||||
t.Fatalf("reading from /bin/echo: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue