aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/index
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-12-23 09:57:37 -0800
committerIan Lance Taylor <iant@golang.org>2020-12-30 15:13:24 -0800
commitcfcbb4227fb20191e04eb8d7766ae6202f526afd (patch)
treee2effea96f6f204451779f044415c2385e45042b /libgo/go/index
parent0696141107d61483f38482b941549959a0d7f613 (diff)
downloadgcc-cfcbb4227fb20191e04eb8d7766ae6202f526afd.zip
gcc-cfcbb4227fb20191e04eb8d7766ae6202f526afd.tar.gz
gcc-cfcbb4227fb20191e04eb8d7766ae6202f526afd.tar.bz2
libgo: update to Go1.16beta1 release
This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
Diffstat (limited to 'libgo/go/index')
-rw-r--r--libgo/go/index/suffixarray/gen.go6
-rw-r--r--libgo/go/index/suffixarray/suffixarray_test.go8
2 files changed, 7 insertions, 7 deletions
diff --git a/libgo/go/index/suffixarray/gen.go b/libgo/go/index/suffixarray/gen.go
index 8c3de55..94184d7 100644
--- a/libgo/go/index/suffixarray/gen.go
+++ b/libgo/go/index/suffixarray/gen.go
@@ -11,8 +11,8 @@ package main
import (
"bytes"
- "io/ioutil"
"log"
+ "os"
"strings"
)
@@ -20,7 +20,7 @@ func main() {
log.SetPrefix("gen: ")
log.SetFlags(0)
- data, err := ioutil.ReadFile("sais.go")
+ data, err := os.ReadFile("sais.go")
if err != nil {
log.Fatal(err)
}
@@ -64,7 +64,7 @@ func main() {
}
}
- if err := ioutil.WriteFile("sais2.go", buf.Bytes(), 0666); err != nil {
+ if err := os.WriteFile("sais2.go", buf.Bytes(), 0666); err != nil {
log.Fatal(err)
}
}
diff --git a/libgo/go/index/suffixarray/suffixarray_test.go b/libgo/go/index/suffixarray/suffixarray_test.go
index 28090de..44c50415 100644
--- a/libgo/go/index/suffixarray/suffixarray_test.go
+++ b/libgo/go/index/suffixarray/suffixarray_test.go
@@ -7,7 +7,7 @@ package suffixarray
import (
"bytes"
"fmt"
- "io/ioutil"
+ "io/fs"
"math/rand"
"os"
"path/filepath"
@@ -498,14 +498,14 @@ func makeText(name string) ([]byte, error) {
switch name {
case "opticks":
var err error
- data, err = ioutil.ReadFile("../../testdata/Isaac.Newton-Opticks.txt")
+ data, err = os.ReadFile("../../testdata/Isaac.Newton-Opticks.txt")
if err != nil {
return nil, err
}
case "go":
- err := filepath.Walk("../..", func(path string, info os.FileInfo, err error) error {
+ err := filepath.WalkDir("../..", func(path string, info fs.DirEntry, err error) error {
if err == nil && strings.HasSuffix(path, ".go") && !info.IsDir() {
- file, err := ioutil.ReadFile(path)
+ file, err := os.ReadFile(path)
if err != nil {
return err
}