aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile
diff options
context:
space:
mode:
authorAndy Pan <panjf2000@gmail.com>2022-08-28 03:38:00 +0800
committerGopher Robot <gobot@golang.org>2022-09-20 02:13:02 +0000
commitf8c659b62ff43e8455ebc675e577b9adc67b3f9f (patch)
tree967f364a5943aa7323224d56a2eb5c969a81ddbe /src/cmd/internal/objfile
parent1e7e160d070443147ee38d4de530ce904637a4f3 (diff)
downloadgo-f8c659b62ff43e8455ebc675e577b9adc67b3f9f.tar.xz
all: replace package ioutil with os and io in src
For #45557 Change-Id: I56824135d86452603dd4ed4bab0e24c201bb0683 Reviewed-on: https://go-review.googlesource.com/c/go/+/426257 Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Andy Pan <panjf2000@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/cmd/internal/objfile')
-rw-r--r--src/cmd/internal/objfile/disasm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/objfile/disasm.go b/src/cmd/internal/objfile/disasm.go
index b5f1cd1632..c298d7e1a9 100644
--- a/src/cmd/internal/objfile/disasm.go
+++ b/src/cmd/internal/objfile/disasm.go
@@ -7,13 +7,11 @@ package objfile
import (
"bufio"
"bytes"
- "cmd/internal/src"
"container/list"
"debug/gosym"
"encoding/binary"
"fmt"
"io"
- "io/ioutil"
"os"
"path/filepath"
"regexp"
@@ -21,6 +19,8 @@ import (
"strings"
"text/tabwriter"
+ "cmd/internal/src"
+
"golang.org/x/arch/arm/armasm"
"golang.org/x/arch/arm64/arm64asm"
"golang.org/x/arch/ppc64/ppc64asm"
@@ -157,7 +157,7 @@ func (fc *FileCache) Line(filename string, line int) ([]byte, error) {
}
if e == nil {
- content, err := ioutil.ReadFile(filename)
+ content, err := os.ReadFile(filename)
if err != nil {
return nil, err
}