From ab6882e5f644315a04fb133c17bb95a102f54afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sat, 24 Jun 2023 22:44:48 +0800 Subject: [PATCH] fix: lint --- plugins/openresty/http/controllers/openresty_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/http/controllers/openresty_controller.go b/plugins/openresty/http/controllers/openresty_controller.go index f1fedaef..73ba2a55 100644 --- a/plugins/openresty/http/controllers/openresty_controller.go +++ b/plugins/openresty/http/controllers/openresty_controller.go @@ -145,7 +145,7 @@ func (r *OpenRestyController) Stop(ctx http.Context) { // Restart 重启OpenResty func (r *OpenRestyController) Restart(ctx http.Context) { cmd := exec.Command("bash", "-c", "systemctl restart openresty") - out, err := cmd.CombinedOutput() + _, err := cmd.CombinedOutput() if err != nil { facades.Log().Error("[OpenResty] 重启OpenResty失败: " + err.Error()) controllers.Error(ctx, http.StatusInternalServerError, "重启OpenResty失败") @@ -153,7 +153,7 @@ func (r *OpenRestyController) Restart(ctx http.Context) { } cmd = exec.Command("bash", "-c", "systemctl status openresty | grep Active | grep -v grep | awk '{print $2}'") - out, err = cmd.CombinedOutput() + out, err := cmd.CombinedOutput() if err != nil { facades.Log().Error("[OpenResty] 获取OpenResty状态失败: " + err.Error()) controllers.Error(ctx, http.StatusInternalServerError, "获取OpenResty状态失败")