fix: I still have no idea how pkger works

This commit is contained in:
ptrcnull 2020-11-16 22:59:20 +01:00
parent 87ed3936b0
commit 4b133a598d

5
app.go
View file

@ -8,9 +8,6 @@ import (
"github.com/markbates/pkger" "github.com/markbates/pkger"
) )
func init() {
pkger.Include("/templates")
}
type App struct { type App struct {
Config Config Config Config
@ -42,7 +39,7 @@ func (app *App) data(ctx *fiber.Ctx, d fiber.Map) fiber.Map {
} }
func New(configs ...Config) *App { func New(configs ...Config) *App {
viewsFs := utils.JoinedFS(pkger.Dir("/templates")) viewsFs := utils.JoinedFS(pkger.Dir("git.ddd.rip/ptrcnull/modweb:/templates"))
views := html.NewFileSystem(viewsFs, ".html") views := html.NewFileSystem(viewsFs, ".html")
views.Reload(true) views.Reload(true)
app := &App{ app := &App{