Hi @jhuggart, what do you think about these changes? Thank you !
This refactor contains the following changes on the code organization:
Trimmed the ratiospoof.go file, now the projects is separated by contexts (folder/packages) inside the internal folder.
Now the code responsible for printing the state lives in its own package (printer). So now i pass the the state variable by reference as argument instead of pointer receiver.
There are two points that i didn't manage to address:
to combine generate and fire announce together
Reason: so the currently application works like ah scheduler, so i need to generate the announce show the user that the announce is on the way and after an interval fire it. So i don't know if combine these two would help in this case.
Hi @jhuggart, what do you think about these changes? Thank you !
This refactor contains the following changes on the code organization:
There are two points that i didn't manage to address:
to combine generate and fire announce together Reason: so the currently application works like ah scheduler, so i need to generate the announce show the user that the announce is on the way and after an interval fire it. So i don't know if combine these two would help in this case.
Usage of ticker Reason: https://github.com/ap-pauloafonso/ratio-spoof/blob/41b4ac97572f1f29e8d913ed6131f71e672bee62/ratiospoof/ratiospoof.go#L252-L258 I don't think a ticker would work in the case of ratio-spoof logic, because i can't execute something if the previous execution was not fired yet. for example:
generate-annunce->wait internal->fire announce -> repeat
Before (ignore out/)
After (ignore out/)