Fixed embedded fs paths for production mode

This commit is contained in:
Magnus Åhall 2025-07-12 09:16:01 +02:00
parent bcd0f1ce15
commit e28a7c765c

View file

@ -11,7 +11,6 @@ import (
"errors"
"fmt"
"io"
"io/fs"
"net/http"
"strconv"
)
@ -24,10 +23,7 @@ func initWebserver() (err error) {
address := fmt.Sprintf("%s:%d", config.Network.Address, config.Network.Port)
logger.Info("webserver", "listen", address)
subViewFS, _ := fs.Sub(viewFS, "views")
subStaticFS, _ := fs.Sub(staticFS, "static")
engine, err = HTMLTemplate.NewEngine(subViewFS, subStaticFS, flagDev)
engine, err = HTMLTemplate.NewEngine(viewFS, staticFS, flagDev)
if err != nil {
err = werr.Wrap(err)
return