Skip to content

Commit

Permalink
Merge pull request #133 from Flipez/fix-ioutil-deprecation
Browse files Browse the repository at this point in the history
[evaluator/module] fix ioutil deprecation
  • Loading branch information
Flipez authored Oct 30, 2022
2 parents 2e09e9c + 7985926 commit 1c590ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluator/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/flipez/rocket-lang/parser"
"github.com/flipez/rocket-lang/utilities"

"io/ioutil"
"os"
)

func EvalModule(name string) object.Object {
Expand All @@ -16,7 +16,7 @@ func EvalModule(name string) object.Object {
return object.NewErrorFormat("Import Error: no module named '%s' found", name)
}

b, err := ioutil.ReadFile(filename)
b, err := os.ReadFile(filename)

if err != nil {
return object.NewErrorFormat("IO Error: error reading module '%s': %s", name, err)
Expand Down

2 comments on commit 1c590ae

@vercel
Copy link

@vercel vercel bot commented on 1c590ae Oct 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 1c590ae Oct 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.