Fixed embedded fs paths for production mode
This commit is contained in:
parent
bcd0f1ce15
commit
e28a7c765c
1 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue