修复模版取文件index.html错误
This commit is contained in:
parent
d115310bb9
commit
a42e18b5f5
2
main.go
2
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user