Do you find making shopping lists BORING? Because I sure do... This repo is to automate the creation of shopping lists and to practice my Golang skills!
When you are running on mac and have the shopping.workflow file present this is how the code operates:
ShoppingV2720.mov
- The codebase works by firstly reading all the JSON files in the recipes folder.
- Once the JSON's have been processed they are passed to the GUI and displayed in a list
- When one of the list items is clicked it will run automation scripts which add a reminder to my reminders app
- The reminders app is an app available on mac and iphone.
- The iCloud then syncs the items in my list to my phone so I can go to the shops and get the stuff I need.
To ensure my code is professional and extendable I followed these rules when making changes:
- Apply unit testing wherever possible and aim for 80% coverage in packages
- Use
golangci-lint run
and the revive linter with all rules enabled: https://github.com/mgechev/revive - Using Interfaces to mock results using the following module: https://github.com/vektra/mockery
If you are not running on a macbook and don't have the shopping.workflow present then the system will just print that it is pretending to add the ingredients so you can still use the system. See the terminal demo below: