mirror of
https://github.com/golang/go
synced 2024-11-22 13:54:45 -07:00
runtime/coverage: remove refs to deprecated io/ioutil
Change-Id: I66965e6a61cf1726db06670978a4654b84f3fd72
GitHub-Last-Rev: 90023e4843
GitHub-Pull-Request: golang/go#65900
Reviewed-on: https://go-review.googlesource.com/c/go/+/566356
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
7db8b9e518
commit
7a64b0f07b
6
src/runtime/coverage/testdata/harness.go
vendored
6
src/runtime/coverage/testdata/harness.go
vendored
@ -9,8 +9,8 @@ import (
|
||||
"fmt"
|
||||
"internal/coverage/slicewriter"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime/coverage"
|
||||
"strings"
|
||||
@ -27,7 +27,7 @@ func emitToWriter() {
|
||||
log.Fatalf("error: WriteMeta returns %v", err)
|
||||
}
|
||||
mf := filepath.Join(*outdirflag, "covmeta.0abcdef")
|
||||
if err := ioutil.WriteFile(mf, slwm.BytesWritten(), 0666); err != nil {
|
||||
if err := os.WriteFile(mf, slwm.BytesWritten(), 0666); err != nil {
|
||||
log.Fatalf("error: writing %s: %v", mf, err)
|
||||
}
|
||||
var slwc slicewriter.WriteSeeker
|
||||
@ -35,7 +35,7 @@ func emitToWriter() {
|
||||
log.Fatalf("error: WriteCounters returns %v", err)
|
||||
}
|
||||
cf := filepath.Join(*outdirflag, "covcounters.0abcdef.99.77")
|
||||
if err := ioutil.WriteFile(cf, slwc.BytesWritten(), 0666); err != nil {
|
||||
if err := os.WriteFile(cf, slwc.BytesWritten(), 0666); err != nil {
|
||||
log.Fatalf("error: writing %s: %v", cf, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user