gorm升级到v2版本

This commit is contained in:
linwenxiang committed 2020-08-27 11:17:15 +08:00
1 parent 93cfe443d6
commit 60c7496f7b
56 files changed
+630 -477

No files matched your search

+3 -3
View File
@@ -53,9 +53,9 @@ func ServerInfo(c *gin.Context) {
memDic["usage"] = memUsedPercent
cpuDic := make(map[string]interface{}, 0)
cpuDic["cpuInfo"],_ = cpu.Info()
percent,_ := cpu.Percent(0,false)
cpuDic["Percent"] = tools.Round(percent[0],2)
cpuDic["cpuInfo"], _ = cpu.Info()
percent, _ := cpu.Percent(0, false)
cpuDic["Percent"] = tools.Round(percent[0], 2)
cpuDic["cpuNum"], _ = cpu.Counts(false)
app.Custum(c, gin.H{