Skip to content

Commit 4f05820

Browse files
author
spark
committed
优化首次启动速度
1 parent abf05aa commit 4f05820

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ func main() {
3535
db.Dao.AutoMigrate(&data.FollowedStock{})
3636

3737
if stocksBin != nil && len(stocksBin) > 0 {
38-
initStockData()
38+
go initStockData()
3939
}
40-
41-
data.NewStockDataApi().GetStockBaseInfo()
40+
go data.NewStockDataApi().GetStockBaseInfo()
4241

4342
// Create an instance of the app structure
4443
app := NewApp()
@@ -51,7 +50,6 @@ func main() {
5150
runtime.WindowSetTitle(app.ctx, "go-stock "+time.Now().Format("2006-01-02 15:04:05"))
5251
}
5352
}()
54-
5553
// Create application with options
5654
err := wails.Run(&options.App{
5755
Title: "go-stock",

0 commit comments

Comments
 (0)