Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format modified AST to buffer first before writing to file
This should avoid all potential scenarios where `format.Node` would fail and the source file would be written to and end up empty. Now, we use a buffer first to catch any of those errors. Only if it doesn't fail, we open the source file and write the formatted modified AST to it.
- Loading branch information