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

Fix errcheck warnings in cmd/tools #3729

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

MichaelSnowden
Copy link
Contributor

What changed?
We now handle all the unhandled errors in cmd/tools

Why?
Because we shouldn't have unhandled errors

How did you test it?
errcheck ./cmd/tools/...

Potential risks
I am pretty sure this isn't run in production, only during development to generate the *client_gen.go files.

Is hotfix candidate?
No.

@MichaelSnowden MichaelSnowden requested a review from a team as a code owner December 19, 2022 21:03
@yycptt yycptt requested a review from dnr December 19, 2022 22:03
Copy link
Member

@dnr dnr left a comment

Choose a reason for hiding this comment

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

This seems unnecessary for a script. How about just wrapping all the io that can return errors in a function that panics if not nil?

@MichaelSnowden
Copy link
Contributor Author

This seems unnecessary for a script. How about just wrapping all the io that can return errors in a function that panics if not nil?

Makes sense, thanks. Fixed!

@MichaelSnowden MichaelSnowden merged commit 23a2c4e into master Dec 20, 2022
@MichaelSnowden MichaelSnowden deleted the errcheck/cmd-tools branch December 20, 2022 01:02
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