2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

fix: lint

This commit is contained in:
耗子
2023-10-27 03:25:23 +08:00
parent b330f8de82
commit 08a443333f
2 changed files with 2 additions and 6 deletions

View File

@@ -216,9 +216,7 @@ func (c *Mysql57Controller) Load(ctx http.Context) http.Response {
re := regexp.MustCompile(expression.regex)
matches := re.FindStringSubmatch(raw)
if len(matches) > 1 {
d := make(map[string]string)
d = map[string]string{"name": expression.name, "value": matches[1]}
d := map[string]string{"name": expression.name, "value": matches[1]}
if expression.name == "发送" || expression.name == "接收" {
d["value"] = tools.FormatBytes(cast.ToFloat64(matches[1]))
}

View File

@@ -216,9 +216,7 @@ func (c *Mysql80Controller) Load(ctx http.Context) http.Response {
re := regexp.MustCompile(expression.regex)
matches := re.FindStringSubmatch(raw)
if len(matches) > 1 {
d := make(map[string]string)
d = map[string]string{"name": expression.name, "value": matches[1]}
d := map[string]string{"name": expression.name, "value": matches[1]}
if expression.name == "发送" || expression.name == "接收" {
d["value"] = tools.FormatBytes(cast.ToFloat64(matches[1]))
}