Missed a few updates on here but made big progress.
Had trouble with the remove functionality in Java. After clicking on the remove ingredient button, not only would the app fail to remove the ingredient, but it would append a copy to the database. After some troubleshooting discovered the issue was on the front end with React. The button was connected to the form submission for the adding ingredient. After rearranging some components was able to fix this issue.
Go Design
The Go version took a few days to design. Was trying to replicate the design pattern from the Java version. Like that version, Service and Dao layers were created for ingredients. Dependency Injection (DI) was another decision. Go does have libraries such as Wire to support DI, but after reading some articles and posts, decided against it to make the code easier to understand.
Completed the Go REST API for adding, removing and searching ingredients. Using the knowledge gained from previous projects, most of this wasn’t too difficult. Had to figure out how to read from multipart form data for the png image file that was sent from the front end.
Created the CRUD operations using Raw SQL instead for ORM for ease of use. Getting the arguments added to the SQL statement took the most time. Also prevented the API from adding duplicate ingredient names.
Overall everything is working perfectly. Still need to create and format response messages from the API as well. Next step is working one the Meal functionality staring with Go.