// 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.
"fmt"
"go/build"
"io"
- "io/ioutil"
"log"
"os"
"os/exec"
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
}
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
}