From e3e5d3e55046ce0c8a45b49c27b3d75acb8c47ad Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Thu, 24 Sep 2026 18:14:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=F0=9F=90=9B:=20format=20the=20dept-list=20e?= =?UTF-8?q?rror=20instead=20of=20printing=20its=20verb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit log.Error is the unformatted entry point, so "find dept list error, %s" went out with the %s intact and the error text glued to it: find dept list error, %sconnection refused Errorf is what the line meant. go vet reports this once go-admin-core's logger is recognised as a print-style wrapper, which it is from v2.10.0. --- app/admin/service/sys_dept.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/service/sys_dept.go b/app/admin/service/sys_dept.go index 3fb89eaf..fc5263d3 100644 --- a/app/admin/service/sys_dept.go +++ b/app/admin/service/sys_dept.go @@ -258,7 +258,7 @@ func (e *SysDept) SetDeptLabel() (m []dto.DeptLabel, err error) { list := make([]models.SysDept, 0) err = e.Orm.Find(&list).Error if err != nil { - log.Error("find dept list error, %s", err.Error()) + log.Errorf("find dept list error, %s", err.Error()) return } m = make([]dto.DeptLabel, 0)