From ef4186e10819a9a43a8cf4ec5614481b819db96f Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Sun, 14 Feb 2021 12:53:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E5=BE=84=E5=88=86?= =?UTF-8?q?=E5=89=B2=E4=B8=8D=E5=90=8C=E7=B3=BB=E7=BB=9F=E5=88=86=E9=9A=94?= =?UTF-8?q?=E7=AC=A6=E4=B8=8D=E5=90=8C=E5=AF=BC=E8=87=B4=E7=9A=84panic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/sys_auto_code.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/sys_auto_code.go b/server/service/sys_auto_code.go index fcaa910c..b9a89b9c 100644 --- a/server/service/sys_auto_code.go +++ b/server/service/sys_auto_code.go @@ -80,7 +80,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) { builder.Write(data) builder.WriteString("\n\n```") - pathArr := strings.Split(value.autoCodePath, "\\") + pathArr := strings.Split(value.autoCodePath, string(os.PathSeparator)) ret[pathArr[1]+"-"+pathArr[3]] = builder.String() _ = f.Close() -- GitLab