Implement basic food service

This commit is contained in:
2024-08-09 16:21:11 +02:00
parent b265a06ce7
commit a23ada9bb0
4 changed files with 305 additions and 18 deletions

17
main.go
View File

@@ -53,7 +53,22 @@ func main() {
Error.Printf("%++v", err)
os.Exit(1)
}
log.Println(Settings)
log.Printf("Loaded settings as: %++v", Settings)
foodService := FoodService{db: &db}
// _, err = foodService.GetRecent()
// if err != nil {
// Error.Printf("%++v", err)
// os.Exit(1)
// }
food, err := foodService.Create(Food{food: "test", amount: 1})
if err != nil {
Error.Printf("%++v", err)
os.Exit(1)
}
log.Println(food)
log.Println("done")
wg.Wait()