Skip to content

Commit

Permalink
Merge pull request #34 from CatalinStratu/Package_Ioutil_is_deprecated
Browse files Browse the repository at this point in the history
#33 Package Ioutil is deprecated
  • Loading branch information
stevemk14ebr authored Aug 10, 2023
2 parents ad76d74 + e2b0b66 commit 532ec98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
test/
GoReSym
Dockerfile.test
.idea
# Dependency directories (remove the comment below to include it)
# vendor/

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 532ec98

Please sign in to comment.