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

🎨 Move from io/ioutil to io and os packages #470

Merged
merged 1 commit into from
Nov 21, 2022
Merged

🎨 Move from io/ioutil to io and os packages #470

merged 1 commit into from
Nov 21, 2022

Conversation

Juneezee
Copy link
Contributor

What this PR does / why we need it:

Recently we have upgraded to Go 1.19 in #318. The io/ioutil package has been deprecated in Go 1.16 (See https://pkg.go.dev/io/ioutil). This PR replaces the existing io/ioutil functions with their new definitions in io and os packages.

  • ioutil.Discard => io.Discard
  • ioutil.NopCloser => io.NopCloser
  • ioutil.ReadAll => io.ReadAll
  • ioutil.ReadFile => os.ReadFile
  • ioutil.TempDir => os.MkdirTemp
  • ioutil.TempFile => os.CreateTemp
  • ioutil.WriteFile => os.WriteFile

The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@netlify
Copy link

netlify bot commented Nov 21, 2022

Deploy Preview for kairos-io canceled.

Name Link
🔨 Latest commit 612aff5
🔍 Latest deploy log https://app.netlify.com/sites/kairos-io/deploys/637b98421cb52a00092850d2

Copy link
Member

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, thanks 💯 !

@mudler mudler enabled auto-merge (squash) November 21, 2022 15:28
@mudler mudler merged commit 50d9143 into kairos-io:master Nov 21, 2022
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

Successfully merging this pull request may close these issues.

2 participants