1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package main import ( "html/template" "github.com/gin-gonic/gin" ) func setupTemplates(router *gin.Engine) { tmpl := template.Must(template.New("").ParseFS( virtualFilesystem, "templates/partials/*.tmpl", "templates/pages/*.tmpl"), ) router.SetHTMLTemplate(tmpl) }