Skip to content

Commit 55e2109

Browse files
author
pixel
committed
代码自动化生成支持预览功能
1 parent 11efbe7 commit 55e2109

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/service/sys_auto_code.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) {
6868
}
6969
builder := strings.Builder{}
7070
builder.WriteString("```")
71+
7172
if ext != "" && strings.Contains(ext, ".") {
7273
builder.WriteString(strings.Replace(ext, ".", "", -1))
7374
}
@@ -79,7 +80,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) {
7980
builder.Write(data)
8081
builder.WriteString("\n\n```")
8182

82-
pathArr := strings.Split(value.autoCodePath,"\\")
83+
pathArr := strings.Split(value.autoCodePath, "\\")
8384
ret[pathArr[1]+"-"+pathArr[3]] = builder.String()
8485
_ = f.Close()
8586

0 commit comments

Comments
 (0)