mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 14:15:17 +00:00
replace io/ioutil to os (#7281)
This commit is contained in:
@@ -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)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user