diff --git a/app/http/controllers/plugins/mysql57/mysql57_controller.go b/app/http/controllers/plugins/mysql57/mysql57_controller.go index 1efc35f8..7fd0a8b7 100644 --- a/app/http/controllers/plugins/mysql57/mysql57_controller.go +++ b/app/http/controllers/plugins/mysql57/mysql57_controller.go @@ -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])) } diff --git a/app/http/controllers/plugins/mysql80/mysql80_controller.go b/app/http/controllers/plugins/mysql80/mysql80_controller.go index 03efbdda..c5b1e28f 100644 --- a/app/http/controllers/plugins/mysql80/mysql80_controller.go +++ b/app/http/controllers/plugins/mysql80/mysql80_controller.go @@ -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])) }