fix deprecation
Some checks failed
Build / build (push) Failing after 6m14s
Publish Image / publish (push) Failing after 36s
Test / build (push) Failing after 6m15s

This commit is contained in:
Chuck Smith
2024-03-29 11:04:21 -04:00
parent 12d43c9835
commit 7435a993d9
3 changed files with 12 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
package builtins
import (
"io/ioutil"
"monkey/internal/object"
"monkey/internal/typing"
"os"
)
// ReadFile ...
@@ -17,7 +17,7 @@ func ReadFile(args ...object.Object) object.Object {
}
filename := args[0].(*object.String).Value
data, err := ioutil.ReadFile(filename)
data, err := os.ReadFile(filename)
if err != nil {
return newError("IOError: error reading from file %s: %s", filename, err)
}