replace io/ioutil to os (#7281)

This commit is contained in:
Koya IWAMURA
2022-06-15 07:10:57 +09:00
committed by GitHub
parent a18ea40d6a
commit 9fce2fbf2a
2 changed files with 6 additions and 7 deletions

View File

@@ -52,10 +52,10 @@ a `[]byte`, which you pass to the `GetRootAsMonster` function:
example "MyGame/Example"
flatbuffers "github.com/google/flatbuffers/go"
io/ioutil
"os"
)
buf, err := ioutil.ReadFile("monster.dat")
buf, err := os.ReadFile("monster.dat")
// handle err
monster := example.GetRootAsMonster(buf, 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~