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:
@@ -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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
6a62e3109c483c2b52a99905dc1ba5c8cb2a281b
|
||||
m2CpSlHPEVq
|
||||
b6e1e4b70a494be9f344a9f31aff520116d0ac24
|
||||
YJs_YtJY0sS
|
||||
|
||||
Reference in New Issue
Block a user