mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 07:07:33 -04:00
unix: remove the use of ioutil
Trivial changes. Change-Id: If7ffa47bb4c3b2bae784091e94516b0f4fc197d2 Reviewed-on: https://go-review.googlesource.com/c/sys/+/526300 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Gopher Robot
parent
38ebf4150f
commit
5a17ddab9a
@@ -32,7 +32,6 @@ import (
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
@@ -433,7 +432,7 @@ func merge(mergedFile string, archFiles ...string) error {
|
||||
// Read architecture files
|
||||
var inSrc []srcFile
|
||||
for _, file := range archFiles {
|
||||
src, err := ioutil.ReadFile(file)
|
||||
src, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot read archfile %s: %w", file, err)
|
||||
}
|
||||
@@ -485,7 +484,7 @@ func merge(mergedFile string, archFiles ...string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = ioutil.WriteFile(inFile.name, src, 0644)
|
||||
err = os.WriteFile(inFile.name, src, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user