mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
Update release and test workflows
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||
|
||||
"github.com/naiba/nezha/pkg/mygin"
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
"github.com/naiba/nezha/resource"
|
||||
"github.com/naiba/nezha/service/singleton"
|
||||
)
|
||||
@@ -29,9 +30,11 @@ func ServeWeb(port uint) *http.Server {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
tmpl, err = tmpl.ParseGlob("resource/template/**/*.html")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
if utils.IsFileExists("resource/template") {
|
||||
tmpl, err = tmpl.ParseGlob("resource/template/**/*.html")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
r.SetHTMLTemplate(tmpl)
|
||||
if singleton.Conf.Debug {
|
||||
|
||||
Reference in New Issue
Block a user