mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
all: remove calls to deprecated ioutil package
Fixes produced via semgrep and https://github.com/dgryski/semgrep-go/blob/master/ioutil.yml
This commit is contained in:
+1
-2
@@ -13,7 +13,6 @@ import (
|
||||
"go/token"
|
||||
"go/types"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
@@ -335,7 +334,7 @@ func (p *Package) OriginalDir() string {
|
||||
// parseFile is a wrapper around parser.ParseFile.
|
||||
func (p *Package) parseFile(path string, mode parser.Mode) (*ast.File, error) {
|
||||
originalPath := p.program.getOriginalPath(path)
|
||||
data, err := ioutil.ReadFile(path)
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user