Replace deprecated ioutil functions with others (#374)

* Remove use of deprecated ioutil functions from examples

* Remove usage of ioutil from gobyexample's own scripts

+ regenerate output
This commit is contained in:
Eli Bendersky
2021-08-28 06:38:35 -07:00
committed by GitHub
parent 952453859f
commit ac94809b64
17 changed files with 65 additions and 73 deletions

View File

@@ -9,7 +9,7 @@ package main
import (
"fmt"
"io/ioutil"
"io"
"os/exec"
)
@@ -46,7 +46,7 @@ func main() {
grepCmd.Start()
grepIn.Write([]byte("hello grep\ngoodbye grep"))
grepIn.Close()
grepBytes, _ := ioutil.ReadAll(grepOut)
grepBytes, _ := io.ReadAll(grepOut)
grepCmd.Wait()
// We omitted error checks in the above example, but

View File

@@ -1,2 +1,2 @@
6a62e3109c483c2b52a99905dc1ba5c8cb2a281b
m2CpSlHPEVq
b6e1e4b70a494be9f344a9f31aff520116d0ac24
YJs_YtJY0sS