memo icon indicating copy to clipboard operation
memo copied to clipboard

Transition from `ioutil.ReadFile` to `os.ReadFile`

Open emp-temp opened this issue 1 year ago • 2 comments

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 avatar Sep 16 '23 16:09 emp-temp

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

mattn avatar Sep 16 '23 16:09 mattn

Thanks for the reply, understood.

emp-temp avatar Sep 16 '23 16:09 emp-temp