2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

fix: lint

This commit is contained in:
耗子
2024-10-12 18:32:13 +08:00
parent 1d9e2761f3
commit de7dd8834f
2 changed files with 3 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ func (s *Service) Load(w http.ResponseWriter, r *http.Request) {
func (s *Service) Log(w http.ResponseWriter, r *http.Request) {
log, err := shell.Execf("tail -n 100 %s/server/postgresql/logs/postgresql-%s.log", app.Root, time.Now().Format(time.DateOnly))
if err != nil {
service.Error(w, http.StatusInternalServerError, log)
service.Error(w, http.StatusInternalServerError, "%v", err)
return
}

View File

@@ -144,7 +144,7 @@ func (s *Service) Delete(w http.ResponseWriter, r *http.Request) {
return
}
if !strings.Contains(config, "["+req.Name+"]") {
service.Error(w, http.StatusUnprocessableEntity, "模块 "+req.Name+" 不存在")
service.Error(w, http.StatusUnprocessableEntity, "模块%s不存在", req.Name)
return
}
@@ -186,7 +186,7 @@ func (s *Service) Update(w http.ResponseWriter, r *http.Request) {
return
}
if !strings.Contains(config, "["+req.Name+"]") {
service.Error(w, http.StatusUnprocessableEntity, "模块 "+req.Name+" 不存在")
service.Error(w, http.StatusUnprocessableEntity, "模块%s不存在", req.Name)
return
}