]> Cypherpunks.ru repositories - gostls13.git/blobdiff - misc/android/go_android_exec.go
[dev.cmdgo] all: merge master (912f075) into dev.cmdgo
[gostls13.git] / misc / android / go_android_exec.go
index 7aa7fe56fc5e0440dceac276f552a977f773eac2..168ebe88a2241340c8ecae41d5c3f85401bb7101 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // This program can be used as go_android_GOARCH_exec by the Go tool.
@@ -14,7 +15,6 @@ import (
        "fmt"
        "go/build"
        "io"
-       "io/ioutil"
        "log"
        "os"
        "os/exec"
@@ -276,7 +276,7 @@ func adbCopyGoroot() error {
        if err := syscall.Flock(int(stat.Fd()), syscall.LOCK_EX); err != nil {
                return err
        }
-       s, err := ioutil.ReadAll(stat)
+       s, err := io.ReadAll(stat)
        if err != nil {
                return err
        }
@@ -294,7 +294,7 @@ func adbCopyGoroot() error {
        goroot := runtime.GOROOT()
        // Build go for android.
        goCmd := filepath.Join(goroot, "bin", "go")
-       tmpGo, err := ioutil.TempFile("", "go_android_exec-cmd-go-*")
+       tmpGo, err := os.CreateTemp("", "go_android_exec-cmd-go-*")
        if err != nil {
                return err
        }