Skip to content

Commit

Permalink
fix bug of template
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaocoll committed Jul 28, 2022
1 parent 42a89a8 commit 6bd6c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func SetupRouter() *gin.Engine {
r.StaticFS("/public", http.FS(content))

// 告诉gin框架去哪里找模板文件
r.LoadHTMLGlob("../routers/templates/*")
//r.LoadHTMLGlob("../routers/templates/*")
t := template.Must(template.New("").ParseFS(content, "templates/*"))
r.SetHTMLTemplate(t)

Expand Down

0 comments on commit 6bd6c04

Please sign in to comment.