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 usages of the deprecated io/ioutil pkg #220

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

andrewkroh
Copy link
Member

Replace usages of the deprecated io/ioutil pkg.

[git-generate]
cat << EOF | go run github.com/uber-go/[email protected] ./...
@@
@@
-import "io/ioutil"
+import "os"

-ioutil.ReadFile(...)
+os.ReadFile(...)

@@
@@
-ioutil.ReadDir(...)
+os.ReadDir(...)
EOF

[git-generate]
cat << EOF | go run github.com/uber-go/[email protected] ./...
@@
@@
-import "io/ioutil"
+import "os"

-ioutil.ReadFile(...)
+os.ReadFile(...)

@@
@@
-ioutil.ReadDir(...)
+os.ReadDir(...)
EOF
@andrewkroh andrewkroh added the enhancement New feature or request label Apr 15, 2024
@andrewkroh andrewkroh requested a review from a team April 15, 2024 23:05
@andrewkroh andrewkroh marked this pull request as ready for review April 15, 2024 23:05
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

gofmt can also do this.

If you retain the git-generate in the commit message, can you add code to replay the changelog addition?

@andrewkroh
Copy link
Member Author

gofmt can also do this.

I was thinking there was a standard tool that could help with this, but I couldn't remember it and my searching turned up nothing. Thanks.

Now I found quay/claircore@2db8ef2 as an example.

@andrewkroh
Copy link
Member Author

If you retain the git-generate in the commit message, can you add code to replay the changelog addition?

Will do.

@andrewkroh andrewkroh merged commit 6057d34 into elastic:main Apr 15, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants