Add food update

This commit is contained in:
2024-08-09 16:36:07 +02:00
parent d06ed72a37
commit 21aeb52d32
2 changed files with 45 additions and 3 deletions

17
main.go
View File

@@ -6,6 +6,7 @@ import (
"fmt"
"io"
"log"
"math/rand"
"os"
"sync"
@@ -70,12 +71,24 @@ func main() {
// }
// log.Println(food)
daily, err := foodService.GetDaily()
// daily, err := foodService.GetDaily()
// if err != nil {
// Error.Printf("%++v", err)
// os.Exit(1)
// }
// log.Println(daily)
test := Food{
food: "test",
amount: rand.Float32(),
rowid: 766,
}
food, err := foodService.Update(test)
if err != nil {
Error.Printf("%++v", err)
os.Exit(1)
}
log.Println(daily)
log.Println(food)
log.Println("done")
wg.Wait()