This PR addresses the overwriting issue in the writeUsers() method of the main.go file. Currently, when generating Reddit accounts using the old UI, the data of the last account is being overwritten after generating 5 accounts. This PR modifies the writeUsers() function to open the file in append mode instead of write mode, ensuring that new data is added to the end of the file without overwriting the existing data.
Summary of Changes
Replaced the os.Create() function with os.OpenFile() function in the writeUsers() method.
Used the os.O_APPEND and os.O_CREATE flags to open the file in append mode.
Updated the writeUsers() method to open the file in append mode, preserving the existing data.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/fix-overwriting-issue
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR addresses the overwriting issue in the writeUsers() method of the main.go file. Currently, when generating Reddit accounts using the old UI, the data of the last account is being overwritten after generating 5 accounts. This PR modifies the writeUsers() function to open the file in append mode instead of write mode, ensuring that new data is added to the end of the file without overwriting the existing data.
Summary of Changes
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.