mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-07 04:52:44 +08:00
- 前端改用通用 DB API,避免强制走 MySQL 接口导致 PostgreSQL 等连接异常 - 后端统一各数据源 timeout(Ping 超时 + 连接参数注入) - DSN 生成兼容特殊字符密码(Postgres/Oracle/达梦/金仓) - 增加文件日志与错误链输出,连接失败提示日志路径便于排障
41 lines
806 B
Go
41 lines
806 B
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
|
|
"GoNavi-Wails/internal/app"
|
|
"GoNavi-Wails/internal/logger"
|
|
|
|
"github.com/wailsapp/wails/v2"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
|
)
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
// Create an instance of the app structure
|
|
application := app.NewApp()
|
|
|
|
// Create application with options
|
|
err := wails.Run(&options.App{
|
|
Title: "GoNavi",
|
|
Width: 1024,
|
|
Height: 768,
|
|
AssetServer: &assetserver.Options{
|
|
Assets: assets,
|
|
},
|
|
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
|
|
OnStartup: application.Startup,
|
|
OnShutdown: application.Shutdown,
|
|
Bind: []interface{}{
|
|
application,
|
|
},
|
|
})
|
|
|
|
if err != nil {
|
|
logger.Error(err, "应用启动失败")
|
|
}
|
|
}
|