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

Transition from ioutil.ReadFile to os.ReadFile #64

Open
emp-temp opened this issue Sep 16, 2023 · 2 comments
Open

Transition from ioutil.ReadFile to os.ReadFile #64

emp-temp opened this issue Sep 16, 2023 · 2 comments

Comments

@emp-temp
Copy link

emp-temp commented Sep 16, 2023

Hello Mattn.

I noticed that in recent versions of Go, the ioutil.ReadFile function has been deprecated in favor of os.ReadFile.

Background:

As per Go's documentation, many of the functions provided by ioutil have been moved to other packages (like os, io, etc.) to streamline the standard library and make the intention of functions clearer.

Issue:

Any current usage of ioutil.ReadFile should be transitioned to os.ReadFile to stay updated with best practices and avoid potential issues in the future.

Suggested Changes:

Replace all instances of ioutil.ReadFile with os.ReadFile.

Thank you for your attention to this matter. I believe making this change will ensure our codebase remains up-to-date with Go's recommended practices.

@emp-temp emp-temp changed the title Transition from ioutil.ReadFile to os.ReadFile Transition from ioutil.ReadFile to os.ReadFile Sep 16, 2023
@mattn
Copy link
Owner

mattn commented Sep 16, 2023

I'm okay if you'll update go.mod too. thanks.

@emp-temp
Copy link
Author

Thanks for the reply, understood.

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

2 participants