diff options
author | ginglis13 <[email protected]> | 2023-10-14 10:19:38 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-10-15 12:12:07 +0200 |
commit | 8d77278c6b6eb3dd1d60d0b24c3329dfb7fd289b (patch) | |
tree | 8fabaa8c193cb6299d589ffbbcc021c1df6ca079 /loader | |
parent | dde9b5ad3aacf2b5fc59aabb0b891876813c145a (diff) | |
download | tinygo-8d77278c6b6eb3dd1d60d0b24c3329dfb7fd289b.tar.gz tinygo-8d77278c6b6eb3dd1d60d0b24c3329dfb7fd289b.zip |
refactor: rm io/ioutil funcs
io/ioutil has been deprecated since Go 1.16
https://pkg.go.dev/io/ioutil
Signed-off-by: ginglis13 <[email protected]>
Diffstat (limited to 'loader')
-rw-r--r-- | loader/goroot.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/loader/goroot.go b/loader/goroot.go index c1479b642..0da8afa0c 100644 --- a/loader/goroot.go +++ b/loader/goroot.go @@ -18,7 +18,6 @@ import ( "errors" "io" "io/fs" - "io/ioutil" "os" "os/exec" "path" @@ -157,7 +156,7 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool) // Add files from TinyGo. tinygoDir := filepath.Join(tinygoSrc, dir) - tinygoEntries, err := ioutil.ReadDir(tinygoDir) + tinygoEntries, err := os.ReadDir(tinygoDir) if err != nil { return nil, err } @@ -177,7 +176,7 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool) // Add all directories from $GOROOT that are not part of the TinyGo // overrides. goDir := filepath.Join(goSrc, dir) - goEntries, err := ioutil.ReadDir(goDir) + goEntries, err := os.ReadDir(goDir) if err != nil { return nil, err } |