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:
Kir Kolyshkin
2023-09-13 18:34:52 +00:00
committed by Gopher Robot
parent 38ebf4150f
commit 5a17ddab9a
6 changed files with 12 additions and 17 deletions
+3 -4
View File
@@ -66,7 +66,6 @@ import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"os"
"regexp"
"strings"
@@ -525,7 +524,7 @@ func main() {
}
// Print zsyscall_aix_ppc64.go
err := ioutil.WriteFile("zsyscall_aix_ppc64.go",
err := os.WriteFile("zsyscall_aix_ppc64.go",
[]byte(fmt.Sprintf(srcTemplate1, cmdLine(), goBuildTags(), plusBuildTags(), pack, imp, textcommon)),
0644)
if err != nil {
@@ -536,7 +535,7 @@ func main() {
// Print zsyscall_aix_ppc64_gc.go
vardecls := "\t" + strings.Join(vars, ",\n\t")
vardecls += " syscallFunc"
err = ioutil.WriteFile("zsyscall_aix_ppc64_gc.go",
err = os.WriteFile("zsyscall_aix_ppc64_gc.go",
[]byte(fmt.Sprintf(srcTemplate2, cmdLine(), goBuildTags(), plusBuildTags(), pack, imp, dynimports, linknames, vardecls, textgc)),
0644)
if err != nil {
@@ -545,7 +544,7 @@ func main() {
}
// Print zsyscall_aix_ppc64_gccgo.go
err = ioutil.WriteFile("zsyscall_aix_ppc64_gccgo.go",
err = os.WriteFile("zsyscall_aix_ppc64_gccgo.go",
[]byte(fmt.Sprintf(srcTemplate3, cmdLine(), goBuildTags(), plusBuildTags(), pack, cExtern, imp, textgccgo)),
0644)
if err != nil {