diff options
author | Damian Gryski <[email protected]> | 2022-08-05 12:26:15 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-08-07 10:32:23 +0200 |
commit | edbbca5614fc5694d0c631cbcea73c7e2e90b336 (patch) | |
tree | cf46bf79f6a7edbb3d4966d8a93d50950d1347ca /builder/objcopy.go | |
parent | 13f21477b118e3f410a196cafcf2e46823e8ba61 (diff) | |
download | tinygo-edbbca5614fc5694d0c631cbcea73c7e2e90b336.tar.gz tinygo-edbbca5614fc5694d0c631cbcea73c7e2e90b336.zip |
all: remove calls to deprecated ioutil package
Fixes produced via semgrep and https://github.com/dgryski/semgrep-go/blob/master/ioutil.yml
Diffstat (limited to 'builder/objcopy.go')
-rw-r--r-- | builder/objcopy.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builder/objcopy.go b/builder/objcopy.go index 991bceba5..cf10547b4 100644 --- a/builder/objcopy.go +++ b/builder/objcopy.go @@ -2,7 +2,7 @@ package builder import ( "debug/elf" - "io/ioutil" + "io" "os" "sort" @@ -87,7 +87,7 @@ func extractROM(path string) (uint64, []byte, error) { // Pad the difference rom = append(rom, make([]byte, diff)...) } - data, err := ioutil.ReadAll(prog.Open()) + data, err := io.ReadAll(prog.Open()) if err != nil { return 0, nil, objcopyError{"failed to extract segment from ELF file: " + path, err} } |