aboutsummaryrefslogtreecommitdiffhomepage
path: root/builder/objcopy.go
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2022-08-05 12:26:15 -0700
committerRon Evans <[email protected]>2022-08-07 10:32:23 +0200
commitedbbca5614fc5694d0c631cbcea73c7e2e90b336 (patch)
treecf46bf79f6a7edbb3d4966d8a93d50950d1347ca /builder/objcopy.go
parent13f21477b118e3f410a196cafcf2e46823e8ba61 (diff)
downloadtinygo-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.go4
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}
}