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!
Table of contents generated with markdown-toc
If no shopping workflow has been specified the code will create an excel sheet which users can print off to take shopping!
ShoppingListExcel.mov
When you are running on mac and have the shopping.workflow file present this is how the code operates:
ShoppingV2720.mov
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:
shoppingV2Terminal.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
- Once multiple recipes are selected and the submit button the workflow is ran.
- There are currently 3 workflows as demoed above.
To ensure code is professional and extendable the following rules should be followed:
- 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
See the PR Template fo more checks to follow.
The pkg-cov workflow runs all go tests and ensures pkg coverage is above 80%.
The pages workflow publishes a test coverage website everytime there is a push to the main branch. The website can be found here: https://gowhale.github.io/go-shopping-list/#file0
The revive workflow is executed to statically analsye go files: https://github.com/mgechev/revive
The golangci-lint workflow runs the golangci-lint linter: https://github.com/golangci/golangci-lint
The authenticate workflow checks that the recipe .json files are in the correct format.
The issue workflow adds a new issue to the projects Kanban board: https://github.com/users/gowhale/projects/1
The cut release workflow creates a binary executable everytime a release is published. The binary file is attached to the release.