Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: The StderrPipe example refers to "io.ReadAll" #45348

Closed
danhigham opened this issue Apr 1, 2021 · 4 comments
Closed

x/website: The StderrPipe example refers to "io.ReadAll" #45348

danhigham opened this issue Apr 1, 2021 · 4 comments

Comments

@danhigham
Copy link

https://golang.org/pkg/os/exec/#Cmd.StderrPipe

The StderrPipe example has an error in it. It refers to "io.ReadAll" and it should be "ioutil.ReadAll" from io/ioutil package.

@gopherbot gopherbot added this to the Unreleased milestone Apr 1, 2021
@danhigham danhigham changed the title x/website: x/website: The StderrPipe example refers to "io.ReadAll" Apr 1, 2021
@nemith
Copy link
Contributor

nemith commented Apr 1, 2021

io.ReadAll was added in Go 1.16 and replaced ioutil.ReadAll with the ioutil being deprecated with ioutil.ReadAll just calling io.ReadAll so the documentation should be correct for Go 1.16 and beyond. Not sure if there is a way to see documentation for older releases via the website. godoc would work locally, however.

https://golang.org/pkg/io/ioutil

As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.

@nemith
Copy link
Contributor

nemith commented Apr 1, 2021

See https://golang.org/doc/go1.16#ioutil

@ianlancetaylor
Copy link
Contributor

Working as intended.

@danhigham
Copy link
Author

Ah, fair enough. I'll get my coat!

@golang golang locked and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants