From 1eda60670522218843ecdeafc6919d9ece89ddbd Mon Sep 17 00:00:00 2001 From: black1552 Date: Thu, 12 Feb 2026 15:29:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E7=AE=80=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=88=9B=E5=BB=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除冗余的日志记录和文件创建操作 - 直接将YAML内容写入配置文件 - 保持配置文件创建成功的日志提示 --- server/config.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/config.go b/server/config.go index 3cdc0ab..c4806ae 100644 --- a/server/config.go +++ b/server/config.go @@ -140,8 +140,6 @@ func DefaultConfigInit() { } g.Log().Info(gctx.New(), "正在检查配置文件", gfile.IsFile(ConfigPath)) if !gfile.IsFile(ConfigPath) { - g.Log().Info(gctx.New(), "正在创建配置文件", ConfigPath) - _, _ = gfile.Create(ConfigPath) g.Log().Info(gctx.New(), "正在写入配置文件", ConfigPath) _ = gfile.PutContents(ConfigPath, gconv.String(yaml)) g.Log().Info(gctx.New(), "配置文件创建成功!")