diff --git a/.gitignore b/.gitignore
index bd85d31..c05c3d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ food.db
food.db-shm
food.db-wal
main.log
+calorie-counter-res.syso
diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte
index f03a624..b7e722b 100644
--- a/frontend/src/App.svelte
+++ b/frontend/src/App.svelte
@@ -1,14 +1,9 @@
diff --git a/frontend/wailsjs/go/main/App.d.ts b/frontend/wailsjs/go/main/App.d.ts
index d7c0783..ac77339 100644
--- a/frontend/wailsjs/go/main/App.d.ts
+++ b/frontend/wailsjs/go/main/App.d.ts
@@ -1,6 +1,5 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
+import {main} from '../models';
-export function Foo():Promise;
-
-export function Greet(arg1:string):Promise;
+export function GetFood():Promise>;
diff --git a/frontend/wailsjs/go/main/App.js b/frontend/wailsjs/go/main/App.js
index 5662d74..3d1f4f0 100644
--- a/frontend/wailsjs/go/main/App.js
+++ b/frontend/wailsjs/go/main/App.js
@@ -2,10 +2,6 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
-export function Foo() {
- return window['go']['main']['App']['Foo']();
-}
-
-export function Greet(arg1) {
- return window['go']['main']['App']['Greet'](arg1);
+export function GetFood() {
+ return window['go']['main']['App']['GetFood']();
}
diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts
new file mode 100644
index 0000000..d9113e0
--- /dev/null
+++ b/frontend/wailsjs/go/models.ts
@@ -0,0 +1,17 @@
+export namespace main {
+
+ export class Food {
+
+
+ static createFrom(source: any = {}) {
+ return new Food(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+
+ }
+ }
+
+}
+
diff --git a/main.go b/main.go
index 8ac3f89..69e517f 100644
--- a/main.go
+++ b/main.go
@@ -41,9 +41,6 @@ var (
)
func main() {
- // var wg sync.WaitGroup
- // wg.Add(1)
-
dbpath := flag.String("db", "food.db", "Path to the database file")
flag.Parse()
@@ -64,41 +61,6 @@ func main() {
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)
-
- // 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(food)
-
- // log.Println("done")
- // wg.Wait()
-
// Create an instance of the app structure
app := NewApp()