aboutsummaryrefslogtreecommitdiff
path: root/misc/ios
diff options
context:
space:
mode:
authorKimMachineGun <geon0250@gmail.com>2021-04-03 08:10:47 +0000
committerIan Lance Taylor <iant@golang.org>2021-04-05 17:51:15 +0000
commita040ebeb980d1a712509fa3d8073cf6ae16cbe78 (patch)
tree5dbb3b41a6506cb0251e49a2bf83cccf3aa571c4 /misc/ios
parent9abedf482752cac0a29c56804f7d34698aa044f2 (diff)
downloadgo-a040ebeb980d1a712509fa3d8073cf6ae16cbe78.tar.gz
go-a040ebeb980d1a712509fa3d8073cf6ae16cbe78.zip
all: update references to symbols moved from io/ioutil to io
Update references missed in CL 263142. For #41190 Change-Id: I778760a6a69bd0440fec0848bdef539c9ccb4ee1 GitHub-Last-Rev: dda42b09fff36dc08ec1cdec50cc19e3da5058e5 GitHub-Pull-Request: golang/go#42874 Reviewed-on: https://go-review.googlesource.com/c/go/+/273946 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'misc/ios')
-rw-r--r--misc/ios/detect.go3
-rw-r--r--misc/ios/go_ios_exec.go9
2 files changed, 5 insertions, 7 deletions
diff --git a/misc/ios/detect.go b/misc/ios/detect.go
index d32bcc3202..cde5723892 100644
--- a/misc/ios/detect.go
+++ b/misc/ios/detect.go
@@ -16,7 +16,6 @@ import (
"bytes"
"crypto/x509"
"fmt"
- "io/ioutil"
"os"
"os/exec"
"strings"
@@ -38,7 +37,7 @@ func main() {
fmt.Println("# will be overwritten when running Go programs.")
for _, mp := range mps {
fmt.Println()
- f, err := ioutil.TempFile("", "go_ios_detect_")
+ f, err := os.CreateTemp("", "go_ios_detect_")
check(err)
fname := f.Name()
defer os.Remove(fname)
diff --git a/misc/ios/go_ios_exec.go b/misc/ios/go_ios_exec.go
index 0acf1b259c..9e63717d92 100644
--- a/misc/ios/go_ios_exec.go
+++ b/misc/ios/go_ios_exec.go
@@ -26,7 +26,6 @@ import (
"fmt"
"go/build"
"io"
- "io/ioutil"
"log"
"net"
"os"
@@ -79,7 +78,7 @@ func main() {
func runMain() (int, error) {
var err error
- tmpdir, err = ioutil.TempDir("", "go_ios_exec_")
+ tmpdir, err = os.MkdirTemp("", "go_ios_exec_")
if err != nil {
return 1, err
}
@@ -205,13 +204,13 @@ func assembleApp(appdir, bin string) error {
}
entitlementsPath := filepath.Join(tmpdir, "Entitlements.plist")
- if err := ioutil.WriteFile(entitlementsPath, []byte(entitlementsPlist()), 0744); err != nil {
+ if err := os.WriteFile(entitlementsPath, []byte(entitlementsPlist()), 0744); err != nil {
return err
}
- if err := ioutil.WriteFile(filepath.Join(appdir, "Info.plist"), []byte(infoPlist(pkgpath)), 0744); err != nil {
+ if err := os.WriteFile(filepath.Join(appdir, "Info.plist"), []byte(infoPlist(pkgpath)), 0744); err != nil {
return err
}
- if err := ioutil.WriteFile(filepath.Join(appdir, "ResourceRules.plist"), []byte(resourceRules), 0744); err != nil {
+ if err := os.WriteFile(filepath.Join(appdir, "ResourceRules.plist"), []byte(resourceRules), 0744); err != nil {
return err
}
return nil