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

Replace deprecated ioutil pkg with os & io #9595

Merged
merged 2 commits into from
Jun 28, 2022
Merged

Conversation

abhinavnair
Copy link
Contributor

What I did
As of Go 1.16, the same functionality of ioutil pkg is now provided by package io or
package os, and those implementations should be preferred in new code.

So replacing all usage of ioutil pkg with io & os.

Related issue
None

(not mandatory) A picture of a cute animal, if possible in relation with what you did

As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.

So replacing all usage of ioutil pkg with io & os.

Signed-off-by: Abhinav Nair <[email protected]>
@thaJeztah
Copy link
Member

Thanks! Perhaps would be good to also configure golangci-lint to prevent this package from accidentally being used; similar to docker/cli@8c3ae38

This is to prevent anyone from accidentally importing the pkg

Signed-off-by: Abhinav Nair <[email protected]>
@abhinavnair
Copy link
Contributor Author

Thanks! Perhaps would be good to also configure golangci-lint to prevent this package from accidentally being used; similar to docker/cli@8c3ae38

Thanks for the suggestion. I have added a commit for golangci-lint 👍🏻

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@glours PTAL

Copy link
Member

@nicksieger nicksieger left a comment

Choose a reason for hiding this comment

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

LGTM

@milas milas merged commit 8e7b658 into docker:v2 Jun 28, 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.

4 participants