[sys] Removed usage of deprecated ioutil.ReadFile

591 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Aug 6, 2022, 1:54:48 AM8/6/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded this change for review.

View Change

Removed usage of deprecated ioutil.ReadFile

ioutil is deprecated. Using corresponding function in **os** package.

Change-Id: Ib26992e4c8aeea4a7febd75ce35a57e7e4b68bef
GitHub-Last-Rev: e1a4385e28c72b0835fb278122bcbd7fdcec5961
GitHub-Pull-Request: golang/sys#130
---
M cpu/hwcap_linux.go
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/cpu/hwcap_linux.go b/cpu/hwcap_linux.go
index f3baa37..7f10df5 100644
--- a/cpu/hwcap_linux.go
+++ b/cpu/hwcap_linux.go
@@ -5,7 +5,7 @@
package cpu

import (
- "io/ioutil"
+ "os"
)

const (
@@ -24,7 +24,7 @@
var hwCap2 uint

func readHWCAP() error {
- buf, err := ioutil.ReadFile(procAuxv)
+ buf, err := os.ReadFile(procAuxv)
if err != nil {
// e.g. on android /proc/self/auxv is not accessible, so silently
// ignore the error and leave Initialized = false. On some

To view, visit change 421854. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: Ib26992e4c8aeea4a7febd75ce35a57e7e4b68bef
Gerrit-Change-Number: 421854
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-MessageType: newchange

Gopher Robot (Gerrit)

unread,
Aug 6, 2022, 1:55:08 AM8/6/22
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.

View Change

    To view, visit change 421854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib26992e4c8aeea4a7febd75ce35a57e7e4b68bef
    Gerrit-Change-Number: 421854
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Sat, 06 Aug 2022 05:55:05 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Ian Lance Taylor (Gerrit)

    unread,
    Aug 6, 2022, 10:51:38 AM8/6/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        Thanks. Let's not make this change yet unless something else in x/sys/cpu requires the 1.16 release.

    To view, visit change 421854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib26992e4c8aeea4a7febd75ce35a57e7e4b68bef
    Gerrit-Change-Number: 421854
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Sat, 06 Aug 2022 14:51:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Gopher Robot (Gerrit)

    unread,
    Aug 6, 2022, 4:00:20 PM8/6/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, golang-co...@googlegroups.com

    Gopher Robot abandoned this change.

    View Change

    Abandoned GitHub PR golang/sys#130 has been closed.

    To view, visit change 421854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib26992e4c8aeea4a7febd75ce35a57e7e4b68bef
    Gerrit-Change-Number: 421854
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
    Gerrit-MessageType: abandon
    Reply all
    Reply to author
    Forward
    0 new messages