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

refactor: improve error handling and resource management in gzip utils #101

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

appleboy
Copy link
Member

  • Simplify error handling by ignoring the error from gzip.NewWriterLevel
  • Reorder gzPool.Put(gz) after gz.Reset(io.Discard) in the defer function

fixed #88

- Simplify error handling by ignoring the error from `gzip.NewWriterLevel`
- Reorder `gzPool.Put(gz)` after `gz.Reset(io.Discard)` in the defer function

Signed-off-by: appleboy <[email protected]>
@appleboy appleboy merged commit 3529136 into master Jan 27, 2025
7 checks passed
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.

Is there a race condition
1 participant