mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
优化首次启动速度
This commit is contained in:
parent
abf05aabd8
commit
4f05820e2e
6
main.go
6
main.go
@ -35,10 +35,9 @@ func main() {
|
||||
db.Dao.AutoMigrate(&data.FollowedStock{})
|
||||
|
||||
if stocksBin != nil && len(stocksBin) > 0 {
|
||||
initStockData()
|
||||
go initStockData()
|
||||
}
|
||||
|
||||
data.NewStockDataApi().GetStockBaseInfo()
|
||||
go data.NewStockDataApi().GetStockBaseInfo()
|
||||
|
||||
// Create an instance of the app structure
|
||||
app := NewApp()
|
||||
@ -51,7 +50,6 @@ func main() {
|
||||
runtime.WindowSetTitle(app.ctx, "go-stock "+time.Now().Format("2006-01-02 15:04:05"))
|
||||
}
|
||||
}()
|
||||
|
||||
// Create application with options
|
||||
err := wails.Run(&options.App{
|
||||
Title: "go-stock",
|
||||
|
Loading…
x
Reference in New Issue
Block a user