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

support: all or nothing #28

Merged
merged 3 commits into from
Oct 30, 2024
Merged

support: all or nothing #28

merged 3 commits into from
Oct 30, 2024

Conversation

sho-hata
Copy link
Owner

This pull request includes significant changes to the run method in the tparagen.go file, focusing on improving error handling and ensuring temporary files are managed correctly.

Error handling improvements and temporary file management:

  • Added a defer function to ensure all temporary files are removed at the end of the run method, regardless of whether an error occurs. (tparagen.go, tparagen.goL59-R74)
  • Moved the tempFiles.Store call to only store the temporary file path if writing to the file is successful. (tparagen.go, tparagen.goL93-R115)
  • Simplified the error handling by directly returning an error from walker.Walk if it occurs, instead of manually removing temporary files in the error case. (tparagen.go, tparagen.goL93-R115)

@sho-hata sho-hata force-pushed the feature/all_or_nothing branch from 67775d2 to b0ebb7f Compare October 30, 2024 04:56
@sho-hata sho-hata changed the title Feature/all or nothing support: all or nothing Oct 30, 2024
@sho-hata sho-hata merged commit d300cad into main Oct 30, 2024
5 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.

1 participant