compnay select
This commit is contained in:
15
app/main.go
15
app/main.go
@@ -1,6 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bordrobot/lib/company"
|
||||
"bordrobot/lib/db"
|
||||
"bordrobot/lib/dbsrv"
|
||||
"embed"
|
||||
"log"
|
||||
"time"
|
||||
@@ -21,6 +24,12 @@ var assets embed.FS
|
||||
// logs any error that might occur.
|
||||
func main() {
|
||||
|
||||
//Init SqLite database
|
||||
err := db.InitDB(".")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Create a new Wails application by providing the necessary options.
|
||||
// Variables 'Name' and 'Description' are for application metadata.
|
||||
// 'Assets' configures the asset server with the 'FS' variable pointing to the frontend files.
|
||||
@@ -30,8 +39,8 @@ func main() {
|
||||
Name: "bordro-robotu",
|
||||
Description: "A demo of using raw HTML & CSS",
|
||||
Bind: []any{
|
||||
&BotService{},
|
||||
&LoginService{},
|
||||
&company.Company{},
|
||||
&dbsrv.Srv{},
|
||||
},
|
||||
Assets: application.AssetOptions{
|
||||
Handler: application.AssetFileServerFS(assets),
|
||||
@@ -70,7 +79,7 @@ func main() {
|
||||
}
|
||||
}()
|
||||
// Run the application. This blocks until the application has been exited.
|
||||
err := app.Run()
|
||||
err = app.Run()
|
||||
|
||||
// If an error occurred while running the application, log it and exit.
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user