mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
fix: lint
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user