From 595ababfdeb87c14e4fc6cc10d90919ef965b5b0 Mon Sep 17 00:00:00 2001 From: ayflying Date: Wed, 14 May 2025 16:17:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B7=AF=E5=BE=84=E6=8B=BC?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 64970fa..4efba6f 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -88,8 +88,8 @@ func (c *Cfg) GetFile(filename string, _pathStr ...string) (jsonObj *gjson.Json, //如果还是没有读取到配置,从当前目录返回上级读取 if bytes == nil { - // 拼接完整的文件路径 - filePath = "../../" + pathStr + filename + ".json" + // 上级拼接完整的文件路径 + filePath = "../../" + filePath if gfile.IsFile(filePath) { bytes = gfile.GetBytes(filePath) // 读取物理文件内容 }