Skip to content

Commit

Permalink
修复模版取文件index.html错误
Browse files Browse the repository at this point in the history
  • Loading branch information
srcrs committed Sep 2, 2023
1 parent d115310 commit a42e18b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a42e18b

Please sign in to comment.