From 57a32855fca8831bac4e75166297539191189595 Mon Sep 17 00:00:00 2001 From: zhouyonggao <1971162852@qq.com> Date: Fri, 19 Dec 2025 01:04:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E5=88=A0=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E5=8F=98=E9=87=8F=E4=BB=A5=E6=B8=85?= =?UTF-8?q?=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了多余的变量used,减少不必要的内存占用 - 优化了list函数中的代码结构 - 提高了代码的可读性和维护性 --- server/internal/api/ymt_users.go | 1 - 1 file changed, 1 deletion(-) diff --git a/server/internal/api/ymt_users.go b/server/internal/api/ymt_users.go index fb6af1d..676fcf4 100644 --- a/server/internal/api/ymt_users.go +++ b/server/internal/api/ymt_users.go @@ -44,7 +44,6 @@ func (a *YMTUsersAPI) list(w http.ResponseWriter, r *http.Request) { defer rows.Close() out := []map[string]interface{}{} - used := map[int64]struct{}{} for rows.Next() { var id sql.NullInt64 var name sql.NullString