From a42e18b5f56faecfea87115121ca0a3139d4d9b0 Mon Sep 17 00:00:00 2001 From: srcrs Date: Sat, 2 Sep 2023 23:59:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E7=89=88=E5=8F=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6index.html=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 7f4f17b..fcaa918 100644 --- a/main.go +++ b/main.go @@ -82,7 +82,7 @@ func tplHandler(w http.ResponseWriter, r *http.Request) { }, } // 加载模板文件 - tmpl, err := tmplInstance.Funcs(funcMap).ParseFiles("index.html") + tmpl, err := tmplInstance.Funcs(funcMap).ParseFS(fileIndex, "index.html") if err != nil { log.Println("模板加载错误:", err) return