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

ioutil.Discard is deprecated #2071

Open
liuup opened this issue Apr 16, 2024 · 1 comment
Open

ioutil.Discard is deprecated #2071

liuup opened this issue Apr 16, 2024 · 1 comment

Comments

@liuup
Copy link

liuup commented Apr 16, 2024

Describe the bug
位于Cloudreve/pkg/request/request.go:261ioutil.Discard变量在Go1.16中已简化为io.Discard,而本项目的编译建议Go >= 1.18,为保持兼容性,是否换成新的变量命名会更加合理

Additional context

  1. Go官方在新版本中对于ioutil.Discard的兼容性处理: var Discard io.Writer = io.Discard
@liuup
Copy link
Author

liuup commented Apr 17, 2024

同理:
Cloudreve/middleware/frontend.go:30 ioutil.ReadAll() -> io.ReadAll()
image

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

No branches or pull requests

1 participant