Skip to content

Commit

Permalink
Package Ioutil is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
CatalinStratu committed Aug 6, 2023
1 parent ad76d74 commit 43c7053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
Expand Down Expand Up @@ -105,7 +104,7 @@ func main_impl(fileName string, printStdPkgs bool, printFilePaths bool, printTyp
extractMetadata.Arch = file.GOARCH()
}

fileData, fileDataErr := ioutil.ReadFile(fileName)
fileData, fileDataErr := os.ReadFile(fileName)
if fileDataErr == nil {

// GOVERSION
Expand Down
3 changes: 1 addition & 2 deletions objfile/disasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -160,7 +159,7 @@ func (fc *FileCache) Line(filename string, line int) ([]byte, error) {
}

if e == nil {
content, err := ioutil.ReadFile(filename)
content, err := os.ReadFile(filename)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 43c7053

Please sign in to comment.