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

mockgen: file should be closed if failed to write #40

Closed
wants to merge 1 commit into from
Closed

mockgen: file should be closed if failed to write #40

wants to merge 1 commit into from

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Jul 14, 2023

This PR fixes a situation when f.Close() is not deferred when dst.Write returns an error. This is because of log.Fatalf internally calls os.Exit. Also, if is inverted to simplify the code.

@sywhang sywhang self-requested a review August 15, 2023 18:28
@alexandear alexandear closed this Oct 17, 2023
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.

1 participant