Skip to content

Move from io/ioutil as it is deprecated #370

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

Closed
keystroke3 opened this issue Feb 25, 2023 · 7 comments
Closed

Move from io/ioutil as it is deprecated #370

keystroke3 opened this issue Feb 25, 2023 · 7 comments
Milestone

Comments

@keystroke3
Copy link
Contributor

io/ioutil is now deprecated but is still being used here:

❯ rg 'ioutil\.' .
./read.go
41:	b, err := ioutil.ReadAll(r)

./dial_test.go
78:					Body: ioutil.NopCloser(strings.NewReader("hi")),
100:				Body:       ioutil.NopCloser(strings.NewReader("hi")),

./dial.go
117:			b, _ := ioutil.ReadAll(r)
119:			resp.Body = ioutil.NopCloser(bytes.NewReader(b))

./examples/chat/chat.go
101:	msg, err := ioutil.ReadAll(body)

./conn_test.go
177:		b, err := ioutil.ReadAll(n1)
208:		_, err := ioutil.ReadAll(n1)

./autobahn_test.go
149:	b, err := ioutil.ReadAll(r)
164:	wstestOut, err := ioutil.ReadFile(path)
209:	f, err := ioutil.TempFile("", "temp.json")```
@Jacalz
Copy link
Contributor

Jacalz commented Mar 7, 2023

FYI: This only makes sense if you want to raise the minimum supported Go version to 1.16 (from 1.13).

I don’t personally have anything against it but it is worth noting as some people might still be using older versions.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 7, 2023

Yup the minimum go version will be raised soon as part of #359

@sagarishere
Copy link

why is this still open when this has been done now.

@nhooyr nhooyr added this to the v1.8.8 milestone Sep 28, 2023
@nhooyr
Copy link
Contributor

nhooyr commented Sep 28, 2023

I don't believe this has been done?

@keystroke3
Copy link
Contributor Author

I believe it is done, unless there is something else that is blocking the merge.

@nhooyr
Copy link
Contributor

nhooyr commented Sep 28, 2023

Right, there's a PR but just hasn't been merged.

@keystroke3
Copy link
Contributor Author

Closing because the PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants